Usage¶
logtailor is a tail program and filter for log files. You can apply it to a copy of a logfile to filter for specific information, or on a log file of a running application to filter the log output in real time.
After installing logtailor it is available as an executable. To get an overview just call::
logtailor --help
This will provide a list of all command line arguments with a short description.
Parsing a log file for some pattern¶
We have a copy of a log file and want to check for certain patterns, e.g., ERROR and WARN logs::
logtailor --log file.log --trigger=ERROR --trigger=WARN --history
–trigger is used to specify patterns to look for. We need to add –history to tell logtailor that also already existing log entries shall be considered.
Using s configuration file¶
When working with the same logs and filters for some time, it gets tedious to enter the same command line arguments over and over again. In this case it is more convenient to use a configuration file. Create a file named .logtailor.ini in the folder you run the program. In the configuration file you can configure a list of log files you want to use. Assign a name to each log file to reference it later on::
[logfiles]
log1 = ./logs/application/server.log
log2 = ./logs/webserver/site.log
In a second section the output file and triggers can be configured::
[global]
output = filtered.log
triggers =
ERROR
interesting message
server started
With such a configuration you can use the short log names instead of the paths to specify a logfile. All triggers in the configuration will be used automatically. More triggers can be added on the command line::
logtailor --log log2 --trigger=WARNING


Machine Learning Nanodegree Summary
Summary
While I did enjoy aspects of the program, I would not recommend it.
Pros:
- Interesting presentation of widely varying topics in an exciting field
- Career support with the perspectives of both students and industrial partners considered
Cons:
- Expensive - total cost was, after all discounts applied, over $60/month
- Too broad in scope
- Competing programs are comparable and cheaper
Thoughts About the Program
A little over a year ago, I got excited about machine learning and its applications to engineering, particularly system identification and optimal parameter tuning. I wanted to learn more about fundamentals and how to solve practical problems with machine learning. At the time, Udacity was starting to make some headway in online learning over competitors like Coursera and edX. Udacity had established partnerships with members of industry and academia, and they were touting a $6000 online Master’s degree through Georgia Tech. I liked their core philosophy, so I thought that the Machine Learning Nanodegree looked very promising.
The nanodegree program was expensive: $200 billed monthly! There were additional incentives. There was a one-third fee reduction for first-time students, and there was also a 50% rebate if the program was completed within one year. The program consisted of several modules, each of which had a project. The capstone project, required for successful completion, was chosen by the student. I liked this. I could see what areas/technologies particularly interested me and solve a relevant problem. After completing my PhD in 2014, I hadn’t done much study in fields outside of systems engineering or dynamical systems, so I was excited by the prospect of learning something new. As an added challenge, the course was built on Python. I knew little about Python programming, other than I knew several smart people who swore by it. I felt that this would be a good platform for learning the language, since the modules had numerous code walkthroughs and in-lesson knowledge assessments.
All of the above factors swayed me in my ultimate decision to enroll in the nanodegree. Originally, I had intended to do a walkthrough of the nanodegree in this post, but I think I’d rather just write up some thoughts I have had on the program.
I will begin by discussing what I think regarding the prerequisites for the program. I can say that a working familiarity with linear algebra, multivariable calculus, and probability is required. Whatever the Udacity folks may say, I believe that even motivated individuals without this core knowledge are going to struggle. Particular focus areas include:
- Understanding extrema of multivariable functions
- Optimization via gradient descent
- Matrix and vector operations, including multiplication and transposition
- Probability and statistics; particularly Baye’s rule and the theorem of total probability
The program begins with a Georgia Tech professor giving an introduction to the exciting field of machine learning. This felt strictly boilerplate, and was pretty lo-fi, in my opinion. The professor did demonstrate a genuine passion for the material, so this, at least was refreshing. What followed, however, was not.
None of the content was original. I understand that the program was one of the first of its kind offered by Udacity, but it felt like very little polish was put on video lectures that had already been recorded and used for other Georgia Tech courses. Now, I understand that a degree program of any kind is simply a cobbling together of different courses that, on the whole, provide a well-defined and vetted curriculum. I had hoped that the nanodegree program would be different. I was thinking of something that had consistency between units and higher production value. Maybe I was unreasonable then, maybe I was not. Either way, I did really like the interactive quizzes; they made learning Python much less painful.
The projects were interesting, and they had a suprising level of depth. Questions were detailed, and focused towards a qualitative, as well as a quantitative, understanding of datasets and their manipulation. The chosen platform of Jupyter notebooks for organizing the work and analyzing it was new to me, but I immediately appreciated the utility. As a matter of fact, I have continued to use it for most projects I work on.
There was career support provided throughout the program. Everything from resume and cover letter preparation is presented, along with detailed review of end products. Udacity even as its own career portal where students can answer a series of “interview” questions that Udacity’s industrial partners can screen for potential matches. I was excited about this at first, and ultimately it did give me much to consider when I prepared my resume for future job searches. However, I quickly realized something troubling regarding the support for my career. At the time, I was a mid-career engineer with a solid income. After researching the types of careers where the material I was learning would be relevant, there was no conceivable way the knowledge would increase my income significantly. I may be wrong, but it is my blog post after all :)
The final project that I chose was to create an entry for a predictive analytics competition on Kaggle. I chose this problem after having difficulty with others that I attempted in computer vision and reinforcement learning. Still naive of the ways of machine learning, and perhaps a little arrogant in my own abilities as a scientist and problem-solver, I grossly underestimated the level of difficulty of solving emerging problems in the field. After spending nearly as much time on the capstone project as on the rest of the program combined, moving on to something with a more clearly defined path to completion was critical to me finishing the nanodegree. The first project was to generate a predictive model for housing prices from a limited feature set, and I was able to leverage some of the products of that first project to complete the capstone.
Conclusion
Like all degree programs, knowledge gained is built upon foundations. An interested party looking to succeed in this program is going to need a good foundation in some advanced mathematics and statistics. I enjoyed working through the problems, and I liked the freedom to choose a final project.
I do believe that the career support would be very useful to early career engineers or recent graduates looking to make themselves more attractive to potential tech employers. Udacity’s ever-widening reach in industry is very powerful, and provides a great opportunity for potential candidates to learn topics that employers care about. In terms of more senior professionals, I don’t know that this particular program will have such positive utility.
In the end, the scope of the program was so broad; topics ranging from engineering to customer segmentation were covered in superficial detail. The breadth of scope, the program cost, and the wide availability of comparable and cheaper courses from competitors like Coursera and edX together form my recommendation against this nanodegree.


{% include "scaffold/incbootstrap.html" %}
No current comment report
Report generated: {{comment_report.created}}.
No comments.


Ping Pong: The Number Game
Let's Play!
Ping Pong is a quick number game that will count up from 1 to the number you've entered with the following exceptions:
- Numbers Divisible by 3 Become "ping"
- Numbers Divisible by 5 Become "pong"
- Numbers Divisible by 3 and 5 become "pingpong"


Recursion is the process of repeating items in a self-similar way. In programming languages, if a program allows you to call a function inside the same function, then it is called a recursive call of the function.
void recursion() { recursion(); /* function calls itself */ } int main() { recursion(); }
The C programming language supports recursion, i.e., a function to call itself. But while using recursion, programmers need to be careful to define an exit condition from the function, otherwise it will go into an infinite loop.
Recursive functions are very useful to solve many mathematical problems, such as calculating the factorial of a number, generating Fibonacci series, etc.
The following example calculates the factorial of a given number using a recursive function −
#include <stdio.h> int factorial(unsigned int i) { if(i <= 1) { return 1; } return i * factorial(i - 1); } int main() { int i = 15; printf("Factorial of %d is %d\n", i, factorial(i)); return 0; }
When the above code is compiled and executed, it produces the following result −
Factorial of 15 is<PHONE_NUMBER>
The following example generates the Fibonacci series for a given number using a recursive function −
#include <stdio.h> int fibonacci(int i) { if(i == 0) { return 0; } if(i == 1) { return 1; } return fibonacci(i-1) + fibonacci(i-2); } int main() { int i; for (i = 0; i < 10; i++) { printf("%d\t\n", fibonacci(i)); } return 0; }
When the above code is compiled and executed, it produces the following result −
0 1 1 2 3 5 8 13 21 34


symbiote
{}
waiting for response ...
Primary Provider
AWS
Azure
Google (not yet supported)
High Availability
Enabled
Templates
Select a template
Function Execute
Database Write
Database Read
File Write
File Read
Submit


Uses of Class
com.opengamma.strata.basics.currency.CurrencyAmount
-
Packages that use CurrencyAmount Package Description com.opengamma.strata.basics.currency Representations of currency and money.com.opengamma.strata.calc.runner The calculation runner.com.opengamma.strata.data.scenario Basic types to model market data across scenarios.com.opengamma.strata.loader.csv Loader that reads market data from CSV files.com.opengamma.strata.loader.fpml Loader that can convert files to financial instruments.com.opengamma.strata.market.amount Defines representations of amounts typically used as result types.com.opengamma.strata.market.explain Support for explaining results.com.opengamma.strata.market.param Market data based on parameters.com.opengamma.strata.measure.bond Base package for calculation functions.com.opengamma.strata.measure.deposit Calculation functions for deposit products.com.opengamma.strata.measure.dsf Calculation functions for DSF products.com.opengamma.strata.measure.fra Calculation functions for FRA products.com.opengamma.strata.measure.fx Calculation functions for FX products.com.opengamma.strata.measure.fxopt Calculation functions for FX option products.com.opengamma.strata.measure.index Calculation functions for index products.com.opengamma.strata.measure.payment Calculation functions for payment products.com.opengamma.strata.measure.swaption Calculation functions for swaption products.com.opengamma.strata.pricer Calculators for financial instruments.com.opengamma.strata.pricer.bond Calculators for bonds.com.opengamma.strata.pricer.capfloor Calculators for Ibor cap-floor.com.opengamma.strata.pricer.cms Calculators for CMS.com.opengamma.strata.pricer.credit Calculators for credit instruments, such as Credit Default Swap (CDS).com.opengamma.strata.pricer.deposit Calculators for rate deposit instruments, such as term deposit.com.opengamma.strata.pricer.dsf Calculators for Deliverable Swap Futures (DSFs).com.opengamma.strata.pricer.fra Calculators for Forward Rate Agreement (FRA) instruments.com.opengamma.strata.pricer.fx Calculators for FX instruments, such as FX forward and FX swap.com.opengamma.strata.pricer.fxopt Calculators for FX options.com.opengamma.strata.pricer.impl.cms com.opengamma.strata.pricer.index Calculators for products based on rate indices, such as Short Term Interest Rate futures (STIRs).com.opengamma.strata.pricer.payment Calculators for payment instruments.com.opengamma.strata.pricer.sensitivity Calculators for sensitivities.com.opengamma.strata.pricer.swap Calculators for interest rate swaps.com.opengamma.strata.pricer.swaption Calculators for swaptions.com.opengamma.strata.product Entity objects describing trades and products in financial markets.com.opengamma.strata.product.capfloor Entity objects describing Ibor cap/floor.com.opengamma.strata.product.common Entity objects shared between other packages.com.opengamma.strata.product.fx Entity objects describing financial instruments in the foreign exchange market.com.opengamma.strata.product.fxopt Entity objects describing options in the foreign exchange market.com.opengamma.strata.product.payment Entity objects describing simple payment financial instruments.com.opengamma.strata.product.swap Entity objects describing a swap.com.opengamma.strata.report.framework.expression Provide the ability to extract data using textual expressions.com.opengamma.strata.report.framework.format Provide the ability to format calculated values. -
-
Uses of CurrencyAmount in com.opengamma.strata.basics.currency
Methods in com.opengamma.strata.basics.currency that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FxMatrix. convert(CurrencyAmount amount, Currency targetCurrency)
Converts aCurrencyAmount
into an amount in the specified currency using the rates in this matrix.CurrencyAmount
FxMatrix. convert(MultiCurrencyAmount amount, Currency targetCurrency)
Converts aMultipleCurrencyAmount
into an amount in the specified currency using the rates in this matrix.CurrencyAmount
CurrencyAmount. convertedTo(Currency resultCurrency, double fxRate)
Converts this amount to an equivalent amount the specified currency.CurrencyAmount
CurrencyAmount. convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
Converts this amount to an equivalent amount in the specified currency.CurrencyAmount
MultiCurrencyAmount. convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
Converts this amount to an equivalent amount the specified currency.CurrencyAmount
CurrencyAmountArray. get(int index)
Gets the amount at the specified index.CurrencyAmount
MultiCurrencyAmount. getAmount(Currency currency)
Gets theCurrencyAmount
for the specified currency, throwing an exception if not found.CurrencyAmount
MultiCurrencyAmount. getAmountOrZero(Currency currency)
Gets theCurrencyAmount
for the specified currency, returning zero if not found.CurrencyAmount
AdjustablePayment. getValue()
Gets the amount of the payment.CurrencyAmount
Payment. getValue()
Gets the amount of the payment.CurrencyAmount
CurrencyAmount. mapAmount(DoubleUnaryOperator mapper)
Applies an operation to the amount.CurrencyAmount
CurrencyAmount. minus(double amountToSubtract)
Returns a copy of thisCurrencyAmount
with the specified amount subtracted.CurrencyAmount
CurrencyAmount. minus(CurrencyAmount amountToSubtract)
Returns a copy of thisCurrencyAmount
with the specified amount subtracted.CurrencyAmount
CurrencyAmount. multipliedBy(double valueToMultiplyBy)
Returns a copy of thisCurrencyAmount
with the amount multiplied.CurrencyAmount
CurrencyAmount. negated()
Returns a copy of thisCurrencyAmount
with the amount negated.CurrencyAmount
CurrencyAmount. negative()
Returns a copy of thisCurrencyAmount
with a negative amount.static CurrencyAmount
CurrencyAmount. of(Currency currency, double amount)
Obtains an instance ofCurrencyAmount
for the specified currency and amount.static CurrencyAmount
CurrencyAmount. of(String currencyCode, double amount)
Obtains an instance ofCurrencyAmount
for the specified ISO-4217 three letter currency code and amount.static CurrencyAmount
CurrencyAmount. parse(String amountStr)
Parses the string to produce aCurrencyAmount
.CurrencyAmount
CurrencyAmount. plus(double amountToAdd)
Returns a copy of thisCurrencyAmount
with the specified amount added.CurrencyAmount
CurrencyAmount. plus(CurrencyAmount amountToAdd)
Returns a copy of thisCurrencyAmount
with the specified amount added.CurrencyAmount
CurrencyAmount. positive()
Returns a copy of thisCurrencyAmount
with a positive amount.CurrencyAmount
BigMoney. toCurrencyAmount()
Converts this monetary amount to the equivalentCurrencyAmount
.CurrencyAmount
Money. toCurrencyAmount()
Converts this monetary amount to the equivalentCurrencyAmount
.static CurrencyAmount
CurrencyAmount. zero(Currency currency)
Obtains a zero amount instance ofCurrencyAmount
for the specified currency.Methods in com.opengamma.strata.basics.currency that return types with arguments of type CurrencyAmount Modifier and Type Method Description org.joda.beans.MetaProperty<ImmutableSortedSet<CurrencyAmount>>
MultiCurrencyAmount.Meta. amounts()
The meta-property for theamounts
property.ImmutableSortedSet<CurrencyAmount>
MultiCurrencyAmount. getAmounts()
Gets the set of currency amounts.Stream<CurrencyAmount>
CurrencyAmountArray. stream()
Returns a stream of the amounts.Stream<CurrencyAmount>
MultiCurrencyAmount. stream()
Returns a stream over the currency amounts.static Collector<CurrencyAmount,?,MultiCurrencyAmount>
MultiCurrencyAmount. toMultiCurrencyAmount()
Returns a collector that can be used to create a multi-currency amount from a stream of amounts.org.joda.beans.MetaProperty<CurrencyAmount>
AdjustablePayment.Meta. value()
The meta-property for thevalue
property.org.joda.beans.MetaProperty<CurrencyAmount>
Payment.Meta. value()
The meta-property for thevalue
property.Methods in com.opengamma.strata.basics.currency with parameters of type CurrencyAmount Modifier and Type Method Description int
CurrencyAmount. compareTo(CurrencyAmount other)
Compares this currency amount to another.CurrencyAmount
FxMatrix. convert(CurrencyAmount amount, Currency targetCurrency)
Converts aCurrencyAmount
into an amount in the specified currency using the rates in this matrix.CurrencyAmount
CurrencyAmount. minus(CurrencyAmount amountToSubtract)
Returns a copy of thisCurrencyAmount
with the specified amount subtracted.CurrencyAmountArray
CurrencyAmountArray. minus(CurrencyAmount amount)
Returns a new array containing the values from this array with the specified amount subtracted.MultiCurrencyAmount
MultiCurrencyAmount. minus(CurrencyAmount amountToSubtract)
Returns a copy of thisMultiCurrencyAmount
with the specified amount subtracted.static AdjustablePayment
AdjustablePayment. of(CurrencyAmount value, AdjustableDate date)
Obtains an instance representing an amount where the date is adjustable.static AdjustablePayment
AdjustablePayment. of(CurrencyAmount value, LocalDate date)
Obtains an instance representing an amount where the date is fixed.static BigMoney
BigMoney. of(CurrencyAmount currencyAmount)
Obtains an instance ofBigMoney
for the specifiedCurrencyAmount
.static Money
Money. of(CurrencyAmount currencyAmount)
Obtains an instance ofMoney
for the specifiedCurrencyAmount
.static MultiCurrencyAmount
MultiCurrencyAmount. of(CurrencyAmount... amounts)
Obtains an instance from an array ofCurrencyAmount
objects.static Payment
Payment. of(CurrencyAmount value, LocalDate date)
Obtains an instance representing an amount.static AdjustablePayment
AdjustablePayment. ofPay(CurrencyAmount value, AdjustableDate date)
Obtains an instance representing an amount to be paid where the date is adjustable.static AdjustablePayment
AdjustablePayment. ofPay(CurrencyAmount value, LocalDate date)
Obtains an instance representing an amount to be paid where the date is fixed.static Payment
Payment. ofPay(CurrencyAmount value, LocalDate date)
Obtains an instance representing an amount to be paid.static AdjustablePayment
AdjustablePayment. ofReceive(CurrencyAmount value, AdjustableDate date)
Obtains an instance representing an amount to be received where the date is adjustable.static AdjustablePayment
AdjustablePayment. ofReceive(CurrencyAmount value, LocalDate date)
Obtains an instance representing an amount to be received where the date is fixed.static Payment
Payment. ofReceive(CurrencyAmount value, LocalDate date)
Obtains an instance representing an amount to be received.CurrencyAmount
CurrencyAmount. plus(CurrencyAmount amountToAdd)
Returns a copy of thisCurrencyAmount
with the specified amount added.CurrencyAmountArray
CurrencyAmountArray. plus(CurrencyAmount amount)
Returns a new array containing the values from this array with the specified amount added.MultiCurrencyAmount
MultiCurrencyAmount. plus(CurrencyAmount amountToAdd)
Returns a copy of thisMultiCurrencyAmount
with the specified amount added.Payment.Builder
Payment.Builder. value(CurrencyAmount value)
Sets the amount of the payment.Method parameters in com.opengamma.strata.basics.currency with type arguments of type CurrencyAmount Modifier and Type Method Description MultiCurrencyAmount
MultiCurrencyAmount. mapCurrencyAmounts(UnaryOperator<CurrencyAmount> operator)
Applies an operation to the currency amounts.static CurrencyAmountArray
CurrencyAmountArray. of(int size, IntFunction<CurrencyAmount> valueFunction)
Obtains an instance using a function to create the entries.static CurrencyAmountArray
CurrencyAmountArray. of(List<CurrencyAmount> amounts)
Obtains an instance from the specified list of amounts.static MultiCurrencyAmount
MultiCurrencyAmount. of(Iterable<CurrencyAmount> amounts)
Obtains an instance from a list ofCurrencyAmount
objects.static MultiCurrencyAmount
MultiCurrencyAmount. total(Iterable<CurrencyAmount> amounts)
Obtains an instance from the total of a list ofCurrencyAmount
objects. -
Uses of CurrencyAmount in com.opengamma.strata.calc.runner
Methods in com.opengamma.strata.calc.runner that return types with arguments of type CurrencyAmount Modifier and Type Method Description static Collector<CurrencyAmount,List<CurrencyAmount>,CurrencyScenarioArray>
FunctionUtils. toCurrencyValuesArray()
Returns a collector that builds a single-currency scenerio result.static Collector<CurrencyAmount,List<CurrencyAmount>,CurrencyScenarioArray>
FunctionUtils. toCurrencyValuesArray()
Returns a collector that builds a single-currency scenerio result. -
Uses of CurrencyAmount in com.opengamma.strata.data.scenario
Methods in com.opengamma.strata.data.scenario that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
CurrencyScenarioArray. get(int index)
Methods in com.opengamma.strata.data.scenario that return types with arguments of type CurrencyAmount Modifier and Type Method Description Stream<CurrencyAmount>
CurrencyScenarioArray. stream()
Methods in com.opengamma.strata.data.scenario with parameters of type CurrencyAmount Modifier and Type Method Description CurrencyScenarioArray
CurrencyScenarioArray. minus(CurrencyAmount amount)
Returns a new array containing the values from this array with the specified amount subtracted.CurrencyScenarioArray
CurrencyScenarioArray. plus(CurrencyAmount amount)
Returns a new array containing the values from this array with the specified amount added.Method parameters in com.opengamma.strata.data.scenario with type arguments of type CurrencyAmount Modifier and Type Method Description static CurrencyScenarioArray
CurrencyScenarioArray. of(int size, IntFunction<CurrencyAmount> amountFunction)
Obtains an instance using a function to create the entries.static CurrencyScenarioArray
CurrencyScenarioArray. of(List<CurrencyAmount> amounts)
Obtains an instance from the specified list of amounts. -
Uses of CurrencyAmount in com.opengamma.strata.loader.csv
Methods in com.opengamma.strata.loader.csv that return CurrencyAmount Modifier and Type Method Description static CurrencyAmount
CsvLoaderUtils. parseCurrencyAmount(CsvRow row, String currencyField, String amountField)
Parses a currency amount.static CurrencyAmount
CsvLoaderUtils. parseCurrencyAmountWithDirection(CsvRow row, String currencyField, String amountField, String directionField)
Parses a currency amount with direction.Methods in com.opengamma.strata.loader.csv that return types with arguments of type CurrencyAmount Modifier and Type Method Description static Optional<CurrencyAmount>
CsvLoaderUtils. tryParseCurrencyAmountWithDirection(CsvRow row, String currencyField, String amountField, String directionField)
Tries parsing a currency amount from the mentioned fields in the csv row.Methods in com.opengamma.strata.loader.csv with parameters of type CurrencyAmount Modifier and Type Method Description static void
CsvWriterUtils. writeCurrencyAmount(CsvOutput.CsvRowOutputWithHeaders csv, CurrencyAmount ccyAmount, String amountField, String currencyField, String directionField)
Writes a currency amount using the provided fields -
Uses of CurrencyAmount in com.opengamma.strata.loader.fpml
Methods in com.opengamma.strata.loader.fpml that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FpmlDocument. parseCurrencyAmount(XmlElement baseEl)
Converts an FpML 'Money' to aCurrencyAmount
. -
Uses of CurrencyAmount in com.opengamma.strata.market.amount
Methods in com.opengamma.strata.market.amount that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
LegAmount. getAmount()
Gets the amount associated with the leg.CurrencyAmount
SwapLegAmount. getAmount()
Gets the amount associated with the leg.CurrencyAmount
CashFlow. getForecastValue()
Gets the forecast value of the cash flow.CurrencyAmount
CashFlow. getPresentValue()
Gets the present value of the cash flow.Methods in com.opengamma.strata.market.amount that return types with arguments of type CurrencyAmount Modifier and Type Method Description org.joda.beans.MetaProperty<CurrencyAmount>
SwapLegAmount.Meta. amount()
The meta-property for theamount
property.org.joda.beans.MetaProperty<CurrencyAmount>
CashFlow.Meta. forecastValue()
The meta-property for theforecastValue
property.org.joda.beans.MetaProperty<CurrencyAmount>
CashFlow.Meta. presentValue()
The meta-property for thepresentValue
property.Methods in com.opengamma.strata.market.amount with parameters of type CurrencyAmount Modifier and Type Method Description SwapLegAmount.Builder
SwapLegAmount.Builder. amount(CurrencyAmount amount)
Sets the amount associated with the leg.static SwapLegAmount
SwapLegAmount. of(ResolvedSwapLeg leg, CurrencyAmount amount)
Obtains an instance from a swap leg and amount.static CashFlow
CashFlow. ofForecastValue(LocalDate paymentDate, CurrencyAmount forecastValue, double discountFactor)
Creates aCashFlow
representing a single cash flow from payment date, forecast value and discount factor.static CashFlow
CashFlow. ofPresentValue(LocalDate paymentDate, CurrencyAmount presentValue, double discountFactor)
Creates aCashFlow
representing a single cash flow from payment date, present value and discount factor. -
Uses of CurrencyAmount in com.opengamma.strata.market.explain
Fields in com.opengamma.strata.market.explain with type parameters of type CurrencyAmount Modifier and Type Field Description static ExplainKey<CurrencyAmount>
ExplainKey. FORECAST_VALUE
The forecast value.static ExplainKey<CurrencyAmount>
ExplainKey. NOTIONAL
The effective notional, which may be converted from the contract notional in the case of FX reset.static ExplainKey<CurrencyAmount>
ExplainKey. PRESENT_VALUE
The present value.static ExplainKey<CurrencyAmount>
ExplainKey. TRADE_NOTIONAL
The notional, as defined in the trade. -
Uses of CurrencyAmount in com.opengamma.strata.market.param
Methods in com.opengamma.strata.market.param that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
CrossGammaParameterSensitivities. total(Currency resultCurrency, FxRateProvider rateProvider)
Returns the total of the sensitivity values.CurrencyAmount
CrossGammaParameterSensitivity. total()
Returns the total of the sensitivity values.CurrencyAmount
CurrencyParameterSensitivities. total(Currency resultCurrency, FxRateProvider rateProvider)
Returns the total of the sensitivity values.CurrencyAmount
CurrencyParameterSensitivity. total()
Returns the total of the sensitivity values. -
Uses of CurrencyAmount in com.opengamma.strata.measure.bond
Methods in com.opengamma.strata.measure.bond that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BillTradeCalculations. currentCash(ResolvedBillTrade trade, LegalEntityDiscountingProvider ratesProvider)
Calculates current cash for a single set of market data.CurrencyAmount
CapitalIndexedBondTradeCalculations. currentCash(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
Calculates current cash for a single set of market data.CurrencyAmount
FixedCouponBondTradeCalculations. currentCash(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider ratesProvider)
Calculates current cash for a single set of market data.CurrencyAmount
BillTradeCalculations. presentValue(ResolvedBillTrade trade, LegalEntityDiscountingProvider ratesProvider)
Calculates present value for a single set of market data.CurrencyAmount
BondFutureOptionTradeCalculations. presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities)
Calculates present value for a single set of market data.CurrencyAmount
BondFutureTradeCalculations. presentValue(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider)
Calculates present value for a single set of market data.CurrencyAmount
CapitalIndexedBondTradeCalculations. presentValue(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider legalEntityProvider)
Calculates present value for a single set of market data.CurrencyAmount
FixedCouponBondTradeCalculations. presentValue(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.deposit
Methods in com.opengamma.strata.measure.deposit that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
TermDepositTradeCalculations. currentCash(ResolvedTermDepositTrade trade, RatesProvider ratesProvider)
Calculates current cash for a single set of market data.CurrencyAmount
TermDepositTradeCalculations. presentValue(ResolvedTermDepositTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.dsf
Methods in com.opengamma.strata.measure.dsf that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DsfTradeCalculations. presentValue(ResolvedDsfTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.fra
Methods in com.opengamma.strata.measure.fra that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FraTradeCalculations. currentCash(ResolvedFraTrade trade, RatesProvider ratesProvider)
Calculates current cash for a single set of market data.CurrencyAmount
FraTradeCalculations. presentValue(ResolvedFraTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.fx
Methods in com.opengamma.strata.measure.fx that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FxNdfTradeCalculations. currentCash(ResolvedFxNdfTrade trade, RatesProvider ratesProvider)
Calculates current cash for a single set of market data.CurrencyAmount
FxNdfTradeCalculations. presentValue(ResolvedFxNdfTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.fxopt
Methods in com.opengamma.strata.measure.fxopt that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FxSingleBarrierOptionTradeCalculations. currentCash(ResolvedFxSingleBarrierOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxSingleBarrierOptionMethod method)
Calculates current cash for a single set of market data.CurrencyAmount
FxVanillaOptionTradeCalculations. currentCash(ResolvedFxVanillaOptionTrade trade, RatesProvider ratesProvider, FxOptionVolatilities volatilities, FxVanillaOptionMethod method)
Calculates current cash for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.index
Methods in com.opengamma.strata.measure.index that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
IborFutureOptionTradeCalculations. presentValue(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, IborFutureOptionVolatilities volatilities)
Calculates present value for a single set of market data.CurrencyAmount
IborFutureTradeCalculations. presentValue(ResolvedIborFutureTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data.CurrencyAmount
OvernightFutureTradeCalculations. presentValue(ResolvedOvernightFutureTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.payment
Methods in com.opengamma.strata.measure.payment that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BulletPaymentTradeCalculations. currentCash(ResolvedBulletPaymentTrade trade, RatesProvider ratesProvider)
Calculates current cash for a single set of market data.CurrencyAmount
BulletPaymentTradeCalculations. presentValue(ResolvedBulletPaymentTrade trade, RatesProvider ratesProvider)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.measure.swaption
Methods in com.opengamma.strata.measure.swaption that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
SwaptionTradeCalculations. currentCash(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities volatilities)
Calculates current cash for a single set of market data.CurrencyAmount
SwaptionTradeCalculations. presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities volatilities)
Calculates present value for a single set of market data. -
Uses of CurrencyAmount in com.opengamma.strata.pricer
Methods in com.opengamma.strata.pricer that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingPaymentPricer. currentCash(Payment payment, BaseProvider provider)
Calculates the current cash.CurrencyAmount
DiscountingPaymentPricer. forecastValue(Payment payment, BaseProvider provider)
Computes the forecast value of the payment.CurrencyAmount
DiscountingPaymentPricer. presentValue(Payment payment, BaseProvider provider)
Computes the present value of the payment by discounting.CurrencyAmount
DiscountingPaymentPricer. presentValue(Payment payment, DiscountFactors discountFactors)
Computes the present value of the payment by discounting.CurrencyAmount
DiscountingPaymentPricer. presentValueWithSpread(Payment payment, DiscountFactors discountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Computes the present value of the payment with z-spread by discounting. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.bond
Methods in com.opengamma.strata.pricer.bond that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingBillTradePricer. currentCash(ResolvedBillTrade trade, LocalDate valuationDate)
Calculates the current cash of a bill trade.CurrencyAmount
DiscountingCapitalIndexedBondProductPricer. currentCash(ResolvedCapitalIndexedBond bond, RatesProvider ratesProvider, LocalDate settlementDate)
Calculates the current cash of the bond product.CurrencyAmount
DiscountingCapitalIndexedBondTradePricer. currentCash(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider)
Calculates the current cash of the bond trade.CurrencyAmount
DiscountingFixedCouponBondTradePricer. currentCash(ResolvedFixedCouponBondTrade trade, LocalDate valuationDate)
Calculates the current cash of the fixed coupon bond trade.CurrencyAmount
DiscountingCapitalIndexedBondTradePricer. netAmount(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider)
Calculates the net amount of the settlement of the bond trade.CurrencyAmount
BlackBondFutureOptionMarginedTradePricer. presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BlackBondFutureVolatilities volatilities, double futurePrice, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade from the underlying future price.CurrencyAmount
BlackBondFutureOptionMarginedTradePricer. presentValue(ResolvedBondFutureOptionTrade trade, LegalEntityDiscountingProvider discountingProvider, BondFutureVolatilities volatilities, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade.CurrencyAmount
BlackBondFutureOptionMarginedTradePricer. presentValue(ResolvedBondFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
Calculates the present value of the bond future option trade from the current option price.CurrencyAmount
BlackFixedCouponBondOptionPricer. presentValue(ResolvedFixedCouponBondOption bondOption, LegalEntityDiscountingProvider legalEntityProvider, BondYieldVolatilities volatilities)
Calculates the present value of the bond option.CurrencyAmount
DiscountingBillProductPricer. presentValue(ResolvedBill bill, LegalEntityDiscountingProvider provider)
Calculates the present value of the bill product.CurrencyAmount
DiscountingBillTradePricer. presentValue(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider)
Calculates the present value of a bill trade.CurrencyAmount
DiscountingBondFutureTradePricer. presentValue(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice)
Calculates the present value of the bond future trade.CurrencyAmount
DiscountingCapitalIndexedBondProductPricer. presentValue(ResolvedCapitalIndexedBond bond, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider)
Calculates the present value of the bond.CurrencyAmount
DiscountingCapitalIndexedBondTradePricer. presentValue(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider)
Calculates the present value of the bond trade.CurrencyAmount
DiscountingFixedCouponBondProductPricer. presentValue(ResolvedFixedCouponBond bond, LegalEntityDiscountingProvider provider)
Calculates the present value of the fixed coupon bond product.CurrencyAmount
DiscountingFixedCouponBondTradePricer. presentValue(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider)
Calculates the present value of the fixed coupon bond trade.CurrencyAmount
DiscountingCapitalIndexedBondTradePricer. presentValueFromCleanPrice(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice)
Calculates the present value of the bond trade from the clean price.CurrencyAmount
DiscountingFixedCouponBondTradePricer. presentValueFromCleanPrice(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, ReferenceData refData, double cleanPrice)
Calculates the present value of the fixed coupon bond trade from the clean price of the underlying product.CurrencyAmount
DiscountingCapitalIndexedBondTradePricer. presentValueFromCleanPriceWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, double cleanRealPrice, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of the settlement of the bond trade from the clean price with z-spread.CurrencyAmount
DiscountingFixedCouponBondTradePricer. presentValueFromCleanPriceWithZSpread(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, ReferenceData refData, double cleanPrice, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of the fixed coupon bond trade with z-spread from the clean price of the underlying product.CurrencyAmount
DiscountingBillProductPricer. presentValueWithZSpread(ResolvedBill bill, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of a bill product with z-spread.CurrencyAmount
DiscountingBillTradePricer. presentValueWithZSpread(ResolvedBillTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of a bill trade with z-spread.CurrencyAmount
DiscountingBondFutureTradePricer. presentValueWithZSpread(ResolvedBondFutureTrade trade, LegalEntityDiscountingProvider discountingProvider, double lastSettlementPrice, double zSpread, CompoundedRateType compoundedRateType, int periodPerYear)
Calculates the present value of the bond future trade with z-spread.CurrencyAmount
DiscountingCapitalIndexedBondProductPricer. presentValueWithZSpread(ResolvedCapitalIndexedBond bond, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of the bond product with z-spread.CurrencyAmount
DiscountingCapitalIndexedBondTradePricer. presentValueWithZSpread(ResolvedCapitalIndexedBondTrade trade, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of the bond trade with z-spread.CurrencyAmount
DiscountingFixedCouponBondProductPricer. presentValueWithZSpread(ResolvedFixedCouponBond bond, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of the fixed coupon bond product with z-spread.CurrencyAmount
DiscountingFixedCouponBondTradePricer. presentValueWithZSpread(ResolvedFixedCouponBondTrade trade, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the present value of the fixed coupon bond trade with z-spread.Methods in com.opengamma.strata.pricer.bond with parameters of type CurrencyAmount Modifier and Type Method Description double
DiscountingCapitalIndexedBondProductPricer. zSpreadFromCurvesAndPv(ResolvedCapitalIndexedBond bond, RatesProvider ratesProvider, LegalEntityDiscountingProvider discountingProvider, ReferenceData refData, CurrencyAmount presentValue, CompoundedRateType compoundedRateType, int periodsPerYear)
Calculates the z-spread of the bond from curves and present value. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.capfloor
Methods in com.opengamma.strata.pricer.capfloor that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
VolatilityIborCapFloorLegPricer. currentCash(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the current cash of the Ibor cap/floor leg.CurrencyAmount
IborCapletFloorletPeriodCurrencyAmounts. getAmount(IborCapletFloorletPeriod period)
Gets a currency amount for the provided Ibor caplet/floorlet.CurrencyAmount
SabrOvernightInArrearsCapletFloorletPeriodPricer. presentValue(OvernightInArrearsCapletFloorletPeriod period, RatesProvider ratesProvider, SabrParametersIborCapletFloorletVolatilities sabrVolatilities)
Computes the present value in the SABR model with effective parameters.CurrencyAmount
VerticalSpreadSabrOvernightInArrearsCapletFloorletBinaryPeriodPricer. presentValue(OvernightInArrearsCapletFloorletBinaryPeriod period, RatesProvider ratesProvider, SabrParametersIborCapletFloorletVolatilities sabrVolatilities)
Calculates the present value of the binary caplet/floorlet period.CurrencyAmount
VerticalSpreadVolatilityIborCapletFloorletBinaryPeriodPricer. presentValue(IborCapletFloorletBinaryPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the binary caplet/floorlet period.CurrencyAmount
VolatilityIborCapFloorLegPricer. presentValue(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor cap/floor leg.CurrencyAmount
VolatilityIborCapletFloorletPeriodPricer. presentValue(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the Ibor caplet/floorlet period.CurrencyAmount
VolatilityOvernightInArrearsCapletFloorletPeriodPricer. presentValue(OvernightInArrearsCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value of the overnight in-arrears caplet/floorlet period.CurrencyAmount
VolatilityIborCapFloorLegPricer. presentValueDelta(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor cap/floor leg.CurrencyAmount
VolatilityIborCapletFloorletPeriodPricer. presentValueDelta(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value delta of the Ibor caplet/floorlet period.CurrencyAmount
VolatilityIborCapFloorLegPricer. presentValueGamma(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor cap/floor leg.CurrencyAmount
VolatilityIborCapletFloorletPeriodPricer. presentValueGamma(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value gamma of the Ibor caplet/floorlet period.CurrencyAmount
VolatilityIborCapFloorLegPricer. presentValueTheta(ResolvedIborCapFloorLeg capFloorLeg, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor cap/floor leg.CurrencyAmount
VolatilityIborCapletFloorletPeriodPricer. presentValueTheta(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities)
Calculates the present value theta of the Ibor caplet/floorlet period.Methods in com.opengamma.strata.pricer.capfloor that return types with arguments of type CurrencyAmount Modifier and Type Method Description org.joda.beans.MetaProperty<ImmutableMap<IborCapletFloorletPeriod,CurrencyAmount>>
IborCapletFloorletPeriodCurrencyAmounts.Meta. amounts()
The meta-property for theamounts
property.Optional<CurrencyAmount>
IborCapletFloorletPeriodCurrencyAmounts. findAmount(IborCapletFloorletPeriod period)
Gets a currency amount for the provided Ibor caplet/floorlet.ImmutableMap<IborCapletFloorletPeriod,CurrencyAmount>
IborCapletFloorletPeriodCurrencyAmounts. getAmounts()
Gets the map of Ibor caplet/floorlet periods to the currency amount.Method parameters in com.opengamma.strata.pricer.capfloor with type arguments of type CurrencyAmount Modifier and Type Method Description IborCapletFloorletPeriodCurrencyAmounts.Builder
IborCapletFloorletPeriodCurrencyAmounts.Builder. amounts(Map<IborCapletFloorletPeriod,CurrencyAmount> amounts)
Sets the map of Ibor caplet/floorlet periods to the currency amount.static IborCapletFloorletPeriodCurrencyAmounts
IborCapletFloorletPeriodCurrencyAmounts. of(Map<IborCapletFloorletPeriod,CurrencyAmount> currencyAmountMap)
Obtains an instance of currency amounts. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.cms
Methods in com.opengamma.strata.pricer.cms that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingCmsLegPricer. currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Calculates the current cash of the leg.CurrencyAmount
SabrExtrapolationReplicationCmsLegPricer. currentCash(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the current cash of the leg.CurrencyAmount
DiscountingCmsLegPricer. presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider)
Computes the present value of CMS leg by simple forward rate estimation.CurrencyAmount
SabrExtrapolationReplicationCmsLegPricer. presentValue(ResolvedCmsLeg cmsLeg, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the CMS leg.CurrencyAmount
SabrExtrapolationReplicationCmsPeriodPricer. presentValue(CmsPeriod cmsPeriod, RatesProvider provider, SabrSwaptionVolatilities swaptionVolatilities)
Computes the present value by replication in SABR framework with extrapolation on the right. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.credit
Methods in com.opengamma.strata.pricer.credit that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
IsdaCdsProductPricer. expectedLoss(ResolvedCds cds, CreditRatesProvider ratesProvider)
Calculates the expected loss of the CDS product.CurrencyAmount
IsdaCdsTradePricer. expectedLoss(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider)
Calculates the expected loss of the underlying product.CurrencyAmount
IsdaHomogenousCdsIndexProductPricer. expectedLoss(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider)
Calculates the expected loss of the CDS index product.CurrencyAmount
IsdaHomogenousCdsIndexTradePricer. expectedLoss(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider)
Calculates the expected loss of the underlying product.CurrencyAmount
AnalyticSpreadSensitivityCalculator. parallelCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData)
CurrencyAmount
FiniteDifferenceSpreadSensitivityCalculator. parallelCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData)
CurrencyAmount
SpreadSensitivityCalculator. parallelCs01(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Computes parallel CS01 for CDS index using a single credit curve.CurrencyAmount
SpreadSensitivityCalculator. parallelCs01(ResolvedCdsIndexTrade trade, List<ResolvedCdsIndexTrade> bucketCdsIndex, CreditRatesProvider ratesProvider, ReferenceData refData)
Computes parallel CS01 for CDS index using a single credit curve.CurrencyAmount
SpreadSensitivityCalculator. parallelCs01(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Computes parallel CS01 for CDS.abstract CurrencyAmount
SpreadSensitivityCalculator. parallelCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData)
Computes parallel CS01 for CDS.CurrencyAmount
IsdaCdsProductPricer. presentValue(ResolvedCds cds, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
Calculates the present value of the CDS product.CurrencyAmount
IsdaCdsTradePricer. presentValue(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the trade.CurrencyAmount
IsdaHomogenousCdsIndexProductPricer. presentValue(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
Calculates the present value of the CDS index product.CurrencyAmount
IsdaHomogenousCdsIndexTradePricer. presentValue(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the trade.CurrencyAmount
IsdaCdsTradePricer. presentValueOnSettle(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the underlying product.CurrencyAmount
IsdaHomogenousCdsIndexTradePricer. presentValueOnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the present value of the underlying product.CurrencyAmount
IsdaCdsProductPricer. recovery01(ResolvedCds cds, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
Calculates the recovery01 of the CDS product.CurrencyAmount
IsdaHomogenousCdsIndexProductPricer. recovery01(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, ReferenceData refData)
Calculates the recovery01 of the CDS index product.CurrencyAmount
IsdaCdsTradePricer. recovery01OnSettle(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the recovery01 of the underlying product.CurrencyAmount
IsdaHomogenousCdsIndexTradePricer. recovery01OnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, ReferenceData refData)
Calculates the recovery01 of the underlying product.CurrencyAmount
IsdaCdsProductPricer. rpv01(ResolvedCds cds, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
Calculates the risky PV01 of the CDS product.CurrencyAmount
IsdaHomogenousCdsIndexProductPricer. rpv01(ResolvedCdsIndex cdsIndex, CreditRatesProvider ratesProvider, LocalDate referenceDate, PriceType priceType, ReferenceData refData)
Calculates the risky PV01 of the CDS index product.CurrencyAmount
IsdaCdsTradePricer. rpv01OnSettle(ResolvedCdsTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the risky PV01 of the underlying product.CurrencyAmount
IsdaHomogenousCdsIndexTradePricer. rpv01OnSettle(ResolvedCdsIndexTrade trade, CreditRatesProvider ratesProvider, PriceType priceType, ReferenceData refData)
Calculates the risky PV01 of the underlying product. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.deposit
Methods in com.opengamma.strata.pricer.deposit that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingTermDepositTradePricer. currentCash(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the current cash.CurrencyAmount
DiscountingIborFixingDepositProductPricer. presentValue(ResolvedIborFixingDeposit deposit, RatesProvider provider)
Calculates the present value of the Ibor fixing deposit product.CurrencyAmount
DiscountingIborFixingDepositTradePricer. presentValue(ResolvedIborFixingDepositTrade trade, RatesProvider provider)
Calculates the present value of the Ibor fixing deposit trade.CurrencyAmount
DiscountingTermDepositProductPricer. presentValue(ResolvedTermDeposit deposit, RatesProvider provider)
Calculates the present value by discounting the final cash flow (nominal + interest) and the initial payment (initial amount).CurrencyAmount
DiscountingTermDepositTradePricer. presentValue(ResolvedTermDepositTrade trade, RatesProvider provider)
Calculates the present value by discounting the final cash flow (nominal + interest) and the initial payment (initial amount). -
Uses of CurrencyAmount in com.opengamma.strata.pricer.dsf
Methods in com.opengamma.strata.pricer.dsf that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingDsfTradePricer. presentValue(ResolvedDsfTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the present value of the deliverable swap futures trade. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.fra
Methods in com.opengamma.strata.pricer.fra that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingFraTradePricer. currentCash(ResolvedFraTrade trade, RatesProvider provider)
Calculates the current cash of the FRA trade.CurrencyAmount
DiscountingFraProductPricer. forecastValue(ResolvedFra fra, RatesProvider provider)
Calculates the forecast value of the FRA product.CurrencyAmount
DiscountingFraTradePricer. forecastValue(ResolvedFraTrade trade, RatesProvider provider)
Calculates the forecast value of the FRA trade.CurrencyAmount
DiscountingFraProductPricer. presentValue(ResolvedFra fra, RatesProvider provider)
Calculates the present value of the FRA product.CurrencyAmount
DiscountingFraTradePricer. presentValue(ResolvedFraTrade trade, RatesProvider provider)
Calculates the present value of the FRA trade. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.fx
Methods in com.opengamma.strata.pricer.fx that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingFxNdfProductPricer. currentCash(ResolvedFxNdf ndf, RatesProvider provider)
Calculates the current cash of the NDF product.CurrencyAmount
DiscountingFxNdfTradePricer. currentCash(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the current cash of the trade.CurrencyAmount
DiscountingFxNdfProductPricer. presentValue(ResolvedFxNdf ndf, RatesProvider provider)
Calculates the present value of the NDF product.CurrencyAmount
DiscountingFxNdfTradePricer. presentValue(ResolvedFxNdfTrade trade, RatesProvider provider)
Calculates the present value of the trade. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.fxopt
Methods in com.opengamma.strata.pricer.fxopt that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BlackFxSingleBarrierOptionTradePricer. currentCash(ResolvedFxSingleBarrierOptionTrade trade, LocalDate valuationDate)
Calculates the current of the FX barrier option trade.CurrencyAmount
BlackFxVanillaOptionTradePricer. currentCash(ResolvedFxVanillaOptionTrade trade, LocalDate valuationDate)
Calculates the current of the FX vanilla option trade.CurrencyAmount
ImpliedTrinomialTreeFxSingleBarrierOptionTradePricer. currentCash(ResolvedFxSingleBarrierOptionTrade trade, LocalDate valuationDate)
Calculates the current of the FX barrier option trade.CurrencyAmount
VannaVolgaFxVanillaOptionTradePricer. currentCash(ResolvedFxVanillaOptionTrade trade, LocalDate valuationDate)
Calculates the current of the FX vanilla option trade.CurrencyAmount
BlackFxSingleBarrierOptionProductPricer. presentValue(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value of the FX barrier option product.CurrencyAmount
BlackFxVanillaOptionProductPricer. presentValue(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value of the foreign exchange vanilla option product.CurrencyAmount
ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer. presentValue(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value of the FX barrier option product.CurrencyAmount
ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer. presentValue(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities, RecombiningTrinomialTreeData treeData)
Calculates the present value of the FX barrier option product.CurrencyAmount
VannaVolgaFxVanillaOptionProductPricer. presentValue(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionSmileVolatilities volatilities)
Calculates the present value of the foreign exchange vanilla option product.CurrencyAmount
BlackFxSingleBarrierOptionProductPricer. presentValueDelta(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value delta of the FX barrier option product.CurrencyAmount
BlackFxVanillaOptionProductPricer. presentValueDelta(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value delta of the foreign exchange vanilla option product.CurrencyAmount
BlackFxSingleBarrierOptionProductPricer. presentValueGamma(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value gamma of the FX barrier option product.CurrencyAmount
BlackFxVanillaOptionProductPricer. presentValueGamma(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value delta of the foreign exchange vanilla option product.CurrencyAmount
BlackFxSingleBarrierOptionProductPricer. presentValueTheta(ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value theta of the FX barrier option product.CurrencyAmount
BlackFxVanillaOptionProductPricer. presentValueTheta(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value theta of the foreign exchange vanilla option product.CurrencyAmount
BlackFxVanillaOptionProductPricer. presentValueVega(ResolvedFxVanillaOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities)
Calculates the present value vega of the foreign exchange vanilla option product. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.impl.cms
Methods in com.opengamma.strata.pricer.impl.cms that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BlackFlatCmsPeriodPricer. presentValue(CmsPeriod cmsPeriod, RatesProvider provider, SwaptionVolatilities swaptionVolatilities)
Computes the present value by replication in SABR framework with extrapolation on the right.CurrencyAmount
DiscountingCmsPeriodPricer. presentValue(CmsPeriod cmsPeriod, RatesProvider provider)
Computes the present value of CMS coupon by simple forward rate estimation. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.index
Methods in com.opengamma.strata.pricer.index that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingIborFutureTradePricer. presentValue(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the present value of the Ibor future trade.CurrencyAmount
DiscountingOvernightFutureTradePricer. presentValue(ResolvedOvernightFutureTrade trade, RatesProvider ratesProvider, double lastSettlementPrice)
Calculates the present value of the Overnight rate future trade.CurrencyAmount
HullWhiteIborFutureTradePricer. presentValue(ResolvedIborFutureTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider, double lastSettlementPrice)
Calculates the present value of the Ibor future trade.CurrencyAmount
NormalIborFutureOptionMarginedTradePricer. presentValue(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, NormalIborFutureOptionVolatilities volatilities, double lastOptionSettlementPrice)
Calculates the present value of the Ibor future option trade.CurrencyAmount
NormalIborFutureOptionMarginedTradePricer. presentValue(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider, NormalIborFutureOptionVolatilities volatilities, double futurePrice, double lastOptionSettlementPrice)
Calculates the present value of the Ibor future option trade from the underlying future price.CurrencyAmount
NormalIborFutureOptionMarginedTradePricer. presentValue(ResolvedIborFutureOptionTrade trade, LocalDate valuationDate, double currentOptionPrice, double lastOptionSettlementPrice)
Calculates the present value of the Ibor future option trade from the current option price. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.payment
Methods in com.opengamma.strata.pricer.payment that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingBulletPaymentTradePricer. currencyExposure(ResolvedBulletPaymentTrade trade, BaseProvider provider)
Calculates the currency exposure of the bullet payment trade.CurrencyAmount
DiscountingBulletPaymentTradePricer. currentCash(ResolvedBulletPaymentTrade trade, BaseProvider provider)
Calculates the current cash of the bullet payment trade.CurrencyAmount
DiscountingBulletPaymentTradePricer. presentValue(ResolvedBulletPaymentTrade trade, BaseProvider provider)
Calculates the present value of the bullet payment trade. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.sensitivity
Method parameters in com.opengamma.strata.pricer.sensitivity with type arguments of type CurrencyAmount Modifier and Type Method Description CurrencyParameterSensitivities
RatesFiniteDifferenceSensitivityCalculator. sensitivity(LegalEntityDiscountingProvider provider, Function<ImmutableLegalEntityDiscountingProvider,CurrencyAmount> valueFn)
Computes the first order sensitivities of a function of a LegalEntityDiscountingProvider to a double by finite difference.CurrencyParameterSensitivities
RatesFiniteDifferenceSensitivityCalculator. sensitivity(CreditRatesProvider provider, Function<ImmutableCreditRatesProvider,CurrencyAmount> valueFn)
Computes the first order sensitivities of a function of aCreditRatesProvider
to a double by finite difference.CurrencyParameterSensitivities
RatesFiniteDifferenceSensitivityCalculator. sensitivity(RatesProvider provider, Function<ImmutableRatesProvider,CurrencyAmount> valueFn)
Computes the first order sensitivities of a function of a RatesProvider to a double by finite difference. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.swap
Methods in com.opengamma.strata.pricer.swap that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
DiscountingSwapLegPricer. accruedInterest(ResolvedSwapLeg leg, RatesProvider provider)
Calculates the accrued interest since the last payment.CurrencyAmount
DiscountingSwapLegPricer. currentCash(ResolvedSwapLeg leg, RatesProvider provider)
Calculates the current cash of the swap leg.CurrencyAmount
DiscountingSwapLegPricer. forecastValue(ResolvedSwapLeg leg, RatesProvider provider)
Calculates the forecast value of the swap leg.CurrencyAmount
DiscountingSwapLegPricer. presentValue(ResolvedSwapLeg leg, Currency currency, RatesProvider provider)
Calculates the present value of the swap leg, converted to the specified currency.CurrencyAmount
DiscountingSwapLegPricer. presentValue(ResolvedSwapLeg leg, RatesProvider provider)
Calculates the present value of the swap leg.CurrencyAmount
DiscountingSwapProductPricer. presentValue(ResolvedSwap swap, Currency currency, RatesProvider provider)
Calculates the present value of the swap product, converted to the specified currency.CurrencyAmount
DiscountingSwapTradePricer. presentValue(ResolvedSwapTrade trade, Currency currency, RatesProvider provider)
Calculates the present value of the swap trade, converted to the specified currency. -
Uses of CurrencyAmount in com.opengamma.strata.pricer.swaption
Methods in com.opengamma.strata.pricer.swaption that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BlackSwaptionTradePricer. currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.CurrencyAmount
HullWhiteSwaptionPhysicalTradePricer. currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.CurrencyAmount
NormalSwaptionTradePricer. currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.CurrencyAmount
SabrSwaptionTradePricer. currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.CurrencyAmount
VolatilitySwaptionTradePricer. currentCash(ResolvedSwaptionTrade trade, LocalDate valuationDate)
Calculates the current cash of the swaption trade.CurrencyAmount
BlackSwaptionTradePricer. presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, BlackSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption trade.CurrencyAmount
HullWhiteSwaptionPhysicalProductPricer. presentValue(ResolvedSwaption swaption, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the present value of the swaption product.CurrencyAmount
HullWhiteSwaptionPhysicalTradePricer. presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider)
Calculates the present value of the swaption trade.CurrencyAmount
NormalSwaptionTradePricer. presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, NormalSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption trade.CurrencyAmount
SabrSwaptionTradePricer. presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SabrSwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption trade.CurrencyAmount
VolatilitySwaptionCashParYieldProductPricer. presentValue(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.CurrencyAmount
VolatilitySwaptionPhysicalProductPricer. presentValue(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.CurrencyAmount
VolatilitySwaptionProductPricer. presentValue(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.CurrencyAmount
VolatilitySwaptionTradePricer. presentValue(ResolvedSwaptionTrade trade, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption trade.CurrencyAmount
VolatilitySwaptionCashParYieldProductPricer. presentValueDelta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value delta of the swaption.CurrencyAmount
VolatilitySwaptionPhysicalProductPricer. presentValueDelta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value delta of the swaption.CurrencyAmount
VolatilitySwaptionProductPricer. presentValueDelta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value delta of the swaption.CurrencyAmount
VolatilitySwaptionCashParYieldProductPricer. presentValueGamma(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value gamma of the swaption.CurrencyAmount
VolatilitySwaptionPhysicalProductPricer. presentValueGamma(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value gamma of the swaption.CurrencyAmount
VolatilitySwaptionProductPricer. presentValueGamma(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value gamma of the swaption.CurrencyAmount
VolatilitySwaptionCashParYieldProductPricer. presentValueTheta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.CurrencyAmount
VolatilitySwaptionPhysicalProductPricer. presentValueTheta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption.CurrencyAmount
VolatilitySwaptionProductPricer. presentValueTheta(ResolvedSwaption swaption, RatesProvider ratesProvider, SwaptionVolatilities swaptionVolatilities)
Calculates the present value of the swaption. -
Uses of CurrencyAmount in com.opengamma.strata.product
Methods in com.opengamma.strata.product that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
SecurityPriceInfo. calculateMonetaryAmount(double quantity, double price)
Calculates the monetary value of the specified quantity and price.CurrencyAmount
SecurityPriceInfo. getTickValue()
Gets the monetary value of one tick.Methods in com.opengamma.strata.product that return types with arguments of type CurrencyAmount Modifier and Type Method Description org.joda.beans.MetaProperty<CurrencyAmount>
SecurityPriceInfo.Meta. tickValue()
The meta-property for thetickValue
property.Methods in com.opengamma.strata.product with parameters of type CurrencyAmount Modifier and Type Method Description static SecurityInfo
SecurityInfo. of(SecurityId id, double tickSize, CurrencyAmount tickValue)
Obtains an instance from the identifier, tick size and tick value.static SecurityPriceInfo
SecurityPriceInfo. of(double tickSize, CurrencyAmount tickValue)
Obtains an instance from the tick size and tick value.static SecurityPriceInfo
SecurityPriceInfo. of(double tickSize, CurrencyAmount tickValue, double contractSize)
Obtains an instance from the tick size, tick value and contract size. -
Uses of CurrencyAmount in com.opengamma.strata.product.capfloor
Methods in com.opengamma.strata.product.capfloor that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
IborCapletFloorletBinaryPeriod. payoff(double fixing)
The payoff for a given fixing rate.CurrencyAmount
OvernightInArrearsCapletFloorletBinaryPeriod. payoff(double fixing)
Returns the binary caplet/floorlet payoff for a given compounded rate.CurrencyAmount
OvernightInArrearsCapletFloorletPeriod. payoff(double rate)
Returns the caplet/floorlet payoff for a given compounded rate. -
Uses of CurrencyAmount in com.opengamma.strata.product.common
Methods in com.opengamma.strata.product.common that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BuySell. normalize(CurrencyAmount amount)
Normalizes the specified amount using this buy/sell rule.CurrencyAmount
PayReceive. normalize(CurrencyAmount amount)
Normalizes the specified amount using this pay/receive rule.Methods in com.opengamma.strata.product.common with parameters of type CurrencyAmount Modifier and Type Method Description static String
SummarizerUtils. amount(CurrencyAmount currencyAmount)
Converts an amount to a string.static String
SummarizerUtils. fx(CurrencyAmount base, CurrencyAmount counter)
Converts an FX exchange to a string.CurrencyAmount
BuySell. normalize(CurrencyAmount amount)
Normalizes the specified amount using this buy/sell rule.CurrencyAmount
PayReceive. normalize(CurrencyAmount amount)
Normalizes the specified amount using this pay/receive rule. -
Uses of CurrencyAmount in com.opengamma.strata.product.fx
Methods in com.opengamma.strata.product.fx that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FxSingle. getBaseCurrencyAmount()
Gets the amount in the base currency, positive if receiving, negative if paying.CurrencyAmount
FxSingle. getCounterCurrencyAmount()
Gets the amount in the counter currency, positive if receiving, negative if paying.CurrencyAmount
FxSingle. getPayCurrencyAmount()
Gets the currency amount in which the amount is paid.CurrencyAmount
FxSingle. getReceiveCurrencyAmount()
Gets the currency amount in which the amount is received.CurrencyAmount
ResolvedFxSingle. getReceiveCurrencyAmount()
Gets the currency amount in which the amount is received.CurrencyAmount
FxNdf. getSettlementCurrencyNotional()
Gets the notional amount in the settlement currency, positive if receiving, negative if paying.CurrencyAmount
ResolvedFxNdf. getSettlementCurrencyNotional()
Gets the notional amount in the settlement currency, positive if receiving, negative if paying.Methods in com.opengamma.strata.product.fx that return types with arguments of type CurrencyAmount Modifier and Type Method Description org.joda.beans.MetaProperty<CurrencyAmount>
FxNdf.Meta. settlementCurrencyNotional()
The meta-property for thesettlementCurrencyNotional
property.org.joda.beans.MetaProperty<CurrencyAmount>
ResolvedFxNdf.Meta. settlementCurrencyNotional()
The meta-property for thesettlementCurrencyNotional
property.Methods in com.opengamma.strata.product.fx with parameters of type CurrencyAmount Modifier and Type Method Description static FxSingle
FxSingle. of(CurrencyAmount amount1, CurrencyAmount amount2, LocalDate paymentDate)
Creates anFxSingle
from two amounts and the value date.static FxSingle
FxSingle. of(CurrencyAmount amount1, CurrencyAmount amount2, LocalDate paymentDate, BusinessDayAdjustment paymentDateAdjustment)
Creates anFxSingle
from two amounts and the value date, specifying a date adjustment.static FxSingle
FxSingle. of(CurrencyAmount amount, FxRate fxRate, LocalDate paymentDate)
Creates anFxSingle
using a rate.static FxSingle
FxSingle. of(CurrencyAmount amount, FxRate fxRate, LocalDate paymentDate, BusinessDayAdjustment paymentDateAdjustment)
Creates anFxSingle
using a rate, specifying a date adjustment.static FxSwap
FxSwap. of(CurrencyAmount amount, FxRate nearRate, LocalDate nearDate, FxRate farRate, LocalDate farDate)
Creates anFxSwap
using two FX rates, near and far, specifying a date adjustment.static FxSwap
FxSwap. of(CurrencyAmount amount, FxRate nearRate, LocalDate nearDate, FxRate farRate, LocalDate farDate, BusinessDayAdjustment paymentDateAdjustment)
Creates anFxSwap
using two FX rates, near and far, specifying a date adjustment.static ResolvedFxSingle
ResolvedFxSingle. of(CurrencyAmount amount1, CurrencyAmount amount2, LocalDate valueDate)
Creates anResolvedFxSingle
from two amounts and the value date.static ResolvedFxSingle
ResolvedFxSingle. of(CurrencyAmount amountCurrency1, FxRate fxRate, LocalDate paymentDate)
Creates anResolvedFxSingle
using a rate.static FxSwap
FxSwap. ofForwardPoints(CurrencyAmount amount, FxRate nearRate, double decimalForwardPoints, LocalDate nearDate, LocalDate farDate)
Creates anFxSwap
using decimal forward points.static FxSwap
FxSwap. ofForwardPoints(CurrencyAmount amount, FxRate nearRate, double decimalForwardPoints, LocalDate nearDate, LocalDate farDate, BusinessDayAdjustment paymentDateAdjustment)
Creates anFxSwap
using decimal forward points, specifying a date adjustment.static ResolvedFxSwap
ResolvedFxSwap. ofForwardPoints(CurrencyAmount amountCurrency1, Currency currency2, double nearFxRate, double forwardPoints, LocalDate nearDate, LocalDate farDate)
Creates aResolvedFxSwap
using forward points.FxNdf.Builder
FxNdf.Builder. settlementCurrencyNotional(CurrencyAmount settlementCurrencyNotional)
Sets the notional amount in the settlement currency, positive if receiving, negative if paying.ResolvedFxNdf.Builder
ResolvedFxNdf.Builder. settlementCurrencyNotional(CurrencyAmount settlementCurrencyNotional)
Sets the notional amount in the settlement currency, positive if receiving, negative if paying. -
Uses of CurrencyAmount in com.opengamma.strata.product.fxopt
Methods in com.opengamma.strata.product.fxopt that return types with arguments of type CurrencyAmount Modifier and Type Method Description Optional<CurrencyAmount>
FxSingleBarrierOption. getRebate()
Gets for a 'out' option, the amount is paid when the barrier is reached; for a 'in' option, the amount is paid at expiry if the barrier is not reached.Optional<CurrencyAmount>
ResolvedFxSingleBarrierOption. getRebate()
Gets for a 'out' option, the amount is paid when the barrier is reached; for a 'in' option, the amount is paid at expiry if the barrier is not reached.org.joda.beans.MetaProperty<CurrencyAmount>
FxSingleBarrierOption.Meta. rebate()
The meta-property for therebate
property.org.joda.beans.MetaProperty<CurrencyAmount>
ResolvedFxSingleBarrierOption.Meta. rebate()
The meta-property for therebate
property.Methods in com.opengamma.strata.product.fxopt with parameters of type CurrencyAmount Modifier and Type Method Description static FxSingleBarrierOption
FxSingleBarrierOption. of(FxVanillaOption underlyingOption, Barrier barrier, CurrencyAmount rebate)
Obtains FX single barrier option with rebate.static ResolvedFxSingleBarrierOption
ResolvedFxSingleBarrierOption. of(ResolvedFxVanillaOption underlyingOption, Barrier barrier, CurrencyAmount rebate)
Obtains FX single barrier option with rebate.FxSingleBarrierOption.Builder
FxSingleBarrierOption.Builder. rebate(CurrencyAmount rebate)
Sets for a 'out' option, the amount is paid when the barrier is reached; for a 'in' option, the amount is paid at expiry if the barrier is not reached. -
Uses of CurrencyAmount in com.opengamma.strata.product.payment
Methods in com.opengamma.strata.product.payment that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
BulletPayment. getValue()
Gets the amount of the payment.Methods in com.opengamma.strata.product.payment that return types with arguments of type CurrencyAmount Modifier and Type Method Description org.joda.beans.MetaProperty<CurrencyAmount>
BulletPayment.Meta. value()
The meta-property for thevalue
property.Methods in com.opengamma.strata.product.payment with parameters of type CurrencyAmount Modifier and Type Method Description BulletPayment.Builder
BulletPayment.Builder. value(CurrencyAmount value)
Sets the amount of the payment. -
Uses of CurrencyAmount in com.opengamma.strata.product.swap
Methods in com.opengamma.strata.product.swap that return CurrencyAmount Modifier and Type Method Description CurrencyAmount
FxResetNotionalExchange. getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.CurrencyAmount
KnownAmountNotionalSwapPaymentPeriod. getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.CurrencyAmount
NotionalPaymentPeriod. getNotionalAmount()
The notional amount, positive if receiving, negative if paying.CurrencyAmount
RatePaymentPeriod. getNotionalAmount()
Gets the notional amount, positive if receiving, negative if paying.CurrencyAmount
NotionalExchange. getPaymentAmount()
Gets the payment amount.Methods in com.opengamma.strata.product.swap that return types with arguments of type CurrencyAmount Modifier and Type Method Description Optional<CurrencyAmount>
ResolvedSwapLeg. findNotional(LocalDate date)
Finds the notional on the specified date.Optional<CurrencyAmount>
FixedRateStubCalculation. getKnownAmount()
Gets the known amount to pay/receive for the stub.Optional<CurrencyAmount>
IborRateStubCalculation. getKnownAmount()
Gets the known amount to pay/receive for the stub.org.joda.beans.MetaProperty<CurrencyAmount>
FixedRateStubCalculation.Meta. knownAmount()
The meta-property for theknownAmount
property.org.joda.beans.MetaProperty<CurrencyAmount>
IborRateStubCalculation.Meta. knownAmount()
The meta-property for theknownAmount
property.org.joda.beans.MetaProperty<CurrencyAmount>
FxResetNotionalExchange.Meta. notionalAmount()
The meta-property for thenotionalAmount
property.org.joda.beans.MetaProperty<CurrencyAmount>
KnownAmountNotionalSwapPaymentPeriod.Meta. notionalAmount()
The meta-property for thenotionalAmount
property.Methods in com.opengamma.strata.product.swap with parameters of type CurrencyAmount Modifier and Type Method Description IborRateStubCalculation.Builder
IborRateStubCalculation.Builder. knownAmount(CurrencyAmount knownAmount)
Sets the known amount to pay/receive for the stub.KnownAmountNotionalSwapPaymentPeriod.Builder
KnownAmountNotionalSwapPaymentPeriod.Builder. notionalAmount(CurrencyAmount notionalAmount)
Sets the notional amount, positive if receiving, negative if paying.static FxResetNotionalExchange
FxResetNotionalExchange. of(CurrencyAmount notionalAmount, LocalDate paymentDate, FxIndexObservation observation)
Obtains an instance from the amount, date and FX index observation.static KnownAmountNotionalSwapPaymentPeriod
KnownAmountNotionalSwapPaymentPeriod. of(Payment payment, SchedulePeriod period, CurrencyAmount notional)
Obtains an instance based on a payment, schedule period and notional.static KnownAmountNotionalSwapPaymentPeriod
KnownAmountNotionalSwapPaymentPeriod. of(Payment payment, SchedulePeriod period, CurrencyAmount notional, FxIndexObservation fxResetObservation)
Obtains an instance based on a payment, schedule period, notional and FX reset.static NotionalExchange
NotionalExchange. of(CurrencyAmount paymentAmount, LocalDate paymentDate)
Obtains an instance from the amount and date.static NotionalSchedule
NotionalSchedule. of(CurrencyAmount notional)
Obtains an instance with a single amount that does not change over time.static FixedRateStubCalculation
FixedRateStubCalculation. ofKnownAmount(CurrencyAmount knownAmount)
Obtains an instance with a known amount of interest.static IborRateStubCalculation
IborRateStubCalculation. ofKnownAmount(CurrencyAmount knownAmount)
Obtains an instance with a known amount of interest. -
Uses of CurrencyAmount in com.opengamma.strata.report.framework.expression
Methods in com.opengamma.strata.report.framework.expression that return types with arguments of type CurrencyAmount Modifier and Type Method Description Class<CurrencyAmount>
CurrencyAmountTokenEvaluator. getTargetType()
Methods in com.opengamma.strata.report.framework.expression with parameters of type CurrencyAmount Modifier and Type Method Description EvaluationResult
CurrencyAmountTokenEvaluator. evaluate(CurrencyAmount amount, CalculationFunctions functions, String firstToken, List<String> remainingTokens)
ImmutableSet<String>
CurrencyAmountTokenEvaluator. tokens(CurrencyAmount amount)
-
Uses of CurrencyAmount in com.opengamma.strata.report.framework.format
Fields in com.opengamma.strata.report.framework.format with type parameters of type CurrencyAmount Modifier and Type Field Description static ValueFormatter<CurrencyAmount>
ValueFormatters. CURRENCY_AMOUNT
The formatter to be used forCurrencyAmount
.
-


href: #step 1
href: #step 2
href: #step 3
href: #step 4
href: #step 5
class: .step1
class: .step2
class: .step3
class: .step4
class: .step5


ROS 2-centric experience
ROS is to roboticists what Linux is to most computer scientists and software developers. It helps roboticists build robot applications. With ROS 2, the capabilities to produce robot behaviours become production ready, with the potential to impact many industries. Opposed to reinventing the wheel with new robotics platforms that overload the space with replicas or forks of libraries and/or similar robotics simulators, Xilinx's approach with KRS meets the ROS robotics community interests and builds on top of ROS 2, together with its tightly connected robotics simulator, Gazebo.
To connect Xilinx's hardware acceleration technology with the ROS 2 world in a way that encourages package maintainers to benefit from it, Xilinx has created a series of extensions to the ROS 2 build system (ament
) and meta build tools (colcon
) that minimize the effort required from ROS 2 package maintainers. This architecture is based on three pillars.
Pillar I - Extensions to ament build system
The first pillar represents extensions of the ament
ROS 2 build system. These CMake extensions help achieve the objective of simplifying the creation of acceleration kernels. By providing an experience and a syntax similar to other ROS 2 libraries targeting CPUs, maintainers will be able to integrate kernels into their packages easily. The ament_acceleration
ROS 2 package abstracts the build system extensions from technology-specific frameworks and software platforms. This allows to easily support hardware acceleration across FPGAs and GPUs while using the same syntax, simplifying the work of maintainers. The code listing below provides an example that instructs the CMakeLists.txt
file of a ROS 2 package to build a vadd
kernel with the corresponding sources and configuration:
acceleration_kernel(
NAME vadd
FILE src/vadd.cpp
INCLUDE
include
TARGET kv260
)
Under the hood, each specialization of ament_acceleration
should rely on the corresponding technology libraries to enable it. For example, ament_vitis
relies on Vitis Unified Software Platform and on the Xilinx Runtime (XRT) library to generate acceleration kernels and facilitate OpenCL communication between the application code and the kernels. Vitis and XRT are completely hidden from the robotics engineer, simplifying the creation of kernels through simple CMake macros. The same kernel expressed with ament_vitis
is presented below:
vitis_acceleration_kernel(
NAME vadd
FILE src/vadd.cpp
CONFIG src/kv260.cfg
INCLUDE
include
TYPE
sw_emu
# hw_emu
# hw
PACKAGE
)
While ament_acceleration
CMake macros are preferred and will be encouraged, maintainers are free to choose among the CMake macros available. After all, it'll be hard to define a generic set of macros that fits all use cases across technologies.
Through ament_acceleration
and technology-specific specializations (like ament_vitis
), the ROS 2 build system is automatically enhanced to support producing acceleration kernel and related artifacts as part of the build process when invoking colcon build
. To facilitate the work of maintainers, this additional functionality is configurable through mixins
that can be added to the build step of a ROS 2 workspace, triggering all the hardware acceleration logic only when appropriate (e.g. when --mixin kv260
is appended to the build effort, it'll trigger the build of kernels targeting the KV260 hardware solution). For a reference implementation of these enhacements, refer to ament_vitis
.
Pillar II - Extensions to colcon build tools
The second pillar extends the colcon
ROS 2 meta built tools to integrate hardware acceleration flows into the ROS 2 CLI tooling and allow to manage it. Examples of these extensions include emulation capabilities to speed-up the development process and/or facilitate it without access to the real hardware, or raw image production tools, which are convenient when packing together acceleration kernels for embedded targets. These extensions are implemented by the colcon_acceleration
ROS 2 package. On a preliminary implementation, these extensions are provided the following colcon acceleration
subverbs:
colcon acceleration subverbs:
board Report the board supported in the deployed firmware
emulation Manage hardware emulation capabilities
hls Vitis HLS capabilities management extension
hypervisor Configure the Xen hypervisor
linux Configure the Linux kernel
list List supported firmware for hardware acceleration
mkinitramfs Creates compressed cpio initramfs (ramdisks) from raw image
mount Mount raw images
package Packages workspace with kernels for distribution
platform Report the platform enabled in the deployed firmware
select Select an existing firmware and default to it.
umount Umount raw images
v++ Vitis v++ compiler wrapper
version Report version of the tool
Using the list
and select
subverbs, it's possible to inspect and configure the different hardware acceleration solutions. The rest of the subverbs allow to manage hardware acceleration artifacts and platforms in a simplified manner.
In turn, the list of subverbs will improve and grow to cover other technology solutions.
Pillar III - a firmware layer for portability
The third pillar is firmware. Represented by the abstract acceleration_firmware
package, it is meant to provide firmware artifacts for each supported technology so that the kernels can be compiled against them, simplifying the process for consumers and maintainers, and further aligning with the ROS typical development flow.
Each ROS 2 workspace can have one or multiple firmware packages deployed. The selection of the active firmware in the workspace is performed by the colcon acceleration select
subverb (pillarII). To get a technology solution aligned with this REP's architecture, each vendor should provide and maintain an acceleration_firmware_<solution>
package specialization that delivers the corresponding artifacts in line with its supported categories_ and capabilities_. Firmware artifacts should be deployed at <ros2_workspace_path>/acceleration/firmware/<solution>
and be ready to be used by the ROS 2 build system extensions at (pillarI) . For a reference implementation of specialized vendor firmware package, see acceleration_firmware_kv260
.
By splitting vendors across packages with a common front-end (acceleration_firmware
), consumers and maintainers can easily switch between hardware acceleration solutions and