SlideShare a Scribd company logo
1 of 64
Download to read offline
STRATA
Open Source Market Risk
STEPHEN COLEBOURNE
• Java Champion, regular conference speaker
• Best known for date & time - Joda-Time and JSR-310
• More Joda projects - http://www.joda.org
• Major contributions in Apache Commons
• Blog - http://blog.joda.org
• Worked at OpenGamma for 6 years
OPENGAMMA
• Founded in 2009
• Financed by Venture Capital
• Mission to bring Open Source values to finance industry
• Focus on Market Risk Analytics, Derivatives and Clearing
• Cloud-based offering coming soon
MARKET RISK
MARKET RISK
• Providing pricing and analytics on a financial portfolio
• “present value (NPV) of an interest rate swap”
• “PV01 of a forward rate agreement (FRA)”
• “vega and gamma of an FX vanilla option”
• “examine the portfolio against a set of scenarios”
COMPONENTS FOR MARKET RISK
• Pricing/Analytic models
• Trade representations - for each supported asset class
• Market data representations - quotes, curves, surfaces, etc.
• Calibration - curves, surfaces, etc.
• Market data management and Scenario creation
• Reference data - holiday calendars, securities
• Basics - schedules, day counts, currencies, etc.
BUILD, BUY OR OPEN SOURCE?
• Build it in-house
• Buy from a vendor
• Open Source
• QuantLib (C++, with exports to other languages)
• Strata (Java/JVM)
STRATA
OVERVIEW
• Open Source - Apache v2 license
• Lightweight, easy-to-use library
• Just jar files - no servers or databases needed
• Released in Maven Central
• Foundation for OpenGamma commercial products
Commons
Trade Model
Market
Data
Pricing &
Analytics
Measures
Data Mgmt
Business day conventions, currencies, day counts, holidays,
identifiers, indices, roll conventions, time-series
Products, trades, securities
Built-in pricers
Sensitivities
Curve framework
Interpolators
Calculation API, scenarios, job execution
Calc functions
Market Data API
Data sourcing
Scenarios
Live data providers
Data sources
Loaders
Source integration
Holiday calendars
Day counts
Currencies
Asset classes
Indices
Pricers
Market data types
Perturbations
Config types
Filters
Measures
Reporting Simple, yet powerful, reporting facilities
Report templates
QUICK START
• Built in examples
• Up and running in minutes
• Hard coded reference data
• Holidays, indices, conventions
• Simple command line reporting
JAVA 8
• Early decision to use Java 8 for Strata
• Features very beneficial for Market Risk Analytics
• Date and Time
• Streams and Lambdas
• Methods on interfaces
• Affects both macro-level design and micro-level code
DEPENDENCIES
• Guava
• Joda-Beans
• Joda-Convert
• SLF4J
• Commons-Math
• Colt
MODULES
• strata-collect - low-level, arrays, time-series, IO, tuples
• strata-basics - holidays, schedules, indices, reference data
• strata-data - market data containers
• strata-market - market data structures - curves, surfaces, etc
• strata-product - trades, products, securities
• strata-loader - data loaders from csv and xml
• strata-pricer - analytic pricers
• strata-calc - calculation engine, scenarios, market data building
• strata-measure - high-level measures, potentially multi-scenario
TRADES
TRADES
• Trades are simple immutable beans (data objects)
• Built using Joda-Beans
• Use builder or static factory to create
• Real properties and methods with Javadoc
JODA-BEANS
• Source code generator/regenerator
• Just write the fields and add a couple of annotations
• Joda-Beans generates additional high-quality source code
• Mutable and immutable beans
• Provides C# style properties
• Easy and fast serialization to XML, JSON, Binary
JODA-BEANS
@BeanDefinition
public final class Person implements ImmutableBean {
@PropertyDefinition(validate = “notNull”)
private final String forename;
@PropertyDefinition(validate = “notNull”)
private final String surname;
// autogenerated getters, equals, hashCode,
// toString, builder, metabean
}
TRADES AND PRODUCTS
• Trade
• Trade date
• Trade identifier
• Counterparty
• Product
• Financial details of the trade
• Effective/Termination date, notional, rate, index, etc.
TRADES AND PRODUCTS
Trade
ProductProductTrade
FraTrade Fra
FRA
// create Fra using builder
Fra fra = Fra.builder()
.buySell(BuySell.BUY) // Buy
.index(IborIndices.GBP_LIBOR_3M) // GBP LIBOR 3M
.notional(10_000_000) // 10 million GBP
.fixedRate(0.0085) // 0.85%
.startDate(LocalDate.of(2016, 9, 14))
.endDate(LocalDate.of(2016, 12, 14))
.build();
FRA
// create FraTrade
Fra fra = ...
TradeInfo info = TradeInfo.builder()
.tradeDate(LocalDate.of(2016, 6, 14))
.id(StandardId.of(“Trade”, “123456”))
.counterparty(StandardId.of(“Party”, “654321”))
.build();
FraTrade trade = FraTrade.of(info, fra);
CONVENTIONS
• Most OTC trades follow market conventions
• Strata includes definitions of some of these conventions
• Avoids repetitive code
FRA CONVENTION
// create FRA from a convention
FraTrade trade =
FraConvention.of(IborIndices.GBP_LIBOR_3M)
.createTrade(
LocalDate.of(2015, 7, 14), // Trade date
Period.ofMonths(2), // start in 2 months
BuySell.BUY, // Buy
10_000_000, // 10 million GBP
0.012, // 1.2%
ReferenceData.standard()); // Holiday calendars
NOTES
• Built in conventions for FRAs
• Built in conventions for 18 ibor-like indices, such as GBP LIBOR
• Built in conventions for 12 overnight indices, such as GBP SONIA
• Built in conventions for currencies
• Built in holiday calendar data, suitable for evaluation
SWAP
• Flexible interest rate swap
• Fixed legs support variable interest rates and known amounts
• Float legs support Ibor, Overnight and Inflation
• Stubs support fixed, floating, interpolated and known amount
• Support for variable notional, gearing and spread
• Conventions and Templates available
SWAP
Trade
ProductProductTrade
SwapTrade Swap
RateCalculation
SwapLeg
RateCalculation
SwapLeg
Swap PeriodicSchedule
NotionalSchedule
PaymentSchedule
Ibor
RateCalculation
Fixed
RateCalculation
Inflation
RateCalculation
Overnight
RateCalculation
SWAP
// create swap from a convention
SwapTrade trade =
FixedIborSwapConventions.GBP_FIXED_1Y_LIBOR_3M
.createTrade(
LocalDate.of(2015, 7, 14), // Trade date
Tenor.TENOR_10Y, // 10 year swap
BuySell.BUY, // Buy
10_000_000, // 10 million GBP
0.014, // 1.4%
ReferenceData.standard()); // Holiday calendars
SECURITIES
• Two approaches supported
• Define security as and when needed
• Setup reference data map of securities
• Provides ability to use, or avoid, a big security master
SECURITIES AS PRODUCTS
IborFutureOption
Trade
IborFutureOption IborFuture
Trade
ProductProductTrade
SECURITIES AS REFERENCE DATA
Trade
IborFutureOption IborFuture
Security
IborFutureOption
Security
IborFuture
Security
SecurityTrade
ReferenceData used to
lookup SecurityId
ReferenceData used to convert
Security to Product
ASSET CLASSES
• Swaps, Swaptions, DSF, CMS, Cap/Floor
• FRA, STIR futures, STIR future options
• Bond, Bond futures, Bond future options
• FX forward, NDF, FX swap, vanilla option, single barrier option
• CDS
• Term deposit, Bullet payment
• Generic security, ETD future, ETD option
• Additional asset classes may be for commercial customers only
PRICERS
PRICERS
• Lower-level analytics API
• Provides ability to calculate PV, sensitivities, greeks, etc.
• Explain facility to understand how result was calculated
• Operates on resolved trades/products
RESOLVING
• Resolving the trade requires reference data
• Locks in dates to the current holiday calendar rules
• Standard reference data contains hard coded holiday rules
// resolve a swap
SwapTrade trade = …
ReferenceData refData = ReferenceData.standard();
ResolvedSwapTrade resolved = trade.resolve(refData);
RESOLVING
Swap SwapLegSwapTrade
Trade resolved using
ReferenceData
Resolved
SwapTrade
Resolved
Swap
Resolved
SwapLeg
Resolved leg contains full list
of accrual/payment periods,
stubs and notional exchange
USING A PRICER
• Stateless - takes resolved trade and any necessary market data
• Calculates for one trade and one set of market data
• Can usually price at trade or product level
USING A PRICER
// obtain the swap and market data to price against
ResolvedSwapTrade trade = ...
RatesProvider market = ...
// calculate the present value
MultiCurrencyAmount pv =
DiscountingSwapTradePricer.DEFAULT
.presentValue(trade, market);
MARKET DATA
MARKET DATA
• Support for all kinds of market data
• Built in classes for FX, quotes, curves, surfaces, etc.
• Many types can be loaded from CSV
• Multi-curve rates calibration
• Scenarios, stored efficiently as arrays
RATES PROVIDER
• RatesProvider is a single, coherent, set of market data
• FX rates, Discount factors, Ibor rates
• Overnight rates, Inflation price indices, Historic fixings
// get discount factors for GBP
DiscountFactors df = ratesProvider.discountFactors(GBP);
double factor = df.discountFactor(date);
MARKET DATA
• MarketData is a container of market data
• Hash-map like
• Keys are MarketDataId<T>
// get curve by identifier
CurveId id = CurveId.of(“Default”, “USD-DSC”);
Curve curve = marketData.getValue(id);
SCENARIO MARKET DATA
• ScenarioMarketData is a container of scenario data
• Hash-map like, where values are arrays
• Keys are MarketDataId<T>
// get curves by identifier
CurveId id = CurveId.of(“Default”, “USD-DSC”);
MarketDataBox<Curve> curves = scenarioData.getValue(id);
// process using a stream (for example)
curves.stream().forEach( curve -> … );
MARKET DATA LOOKUP
• Market data containers hold arbitrary sets of market data
• May hold multiple USD discounting curves
• RatesMarketDataLookup is used to select a coherent set
CurveId usdDscId = CurveId.of(“Default”, “USD-DSC”);
CurveId usdLiborId = CurveId.of(“Default”, “USD-LIBOR”);
// map currency/index to curve
RatesMarketDataLookup md = RatesMarketDataLookup.of(
ImmutableMap.of(Currency.USD, usdDscId),
ImmutableMap.of(
IborIndices.USD_LIBOR_3M, usdLiborId),
IborIndices.USD_LIBOR_6M, usdLiborId));
COMBINATIONS
MarketData RatesProviderRatesMarketDataLookup+ =
• Many curves
• Keyed by curve ID
• Map currency to curve ID
• Map index to curve ID
• DF by currency+date
• Rate by index+date
MARKET DATA BUILDING
• Can create market data manually, loading from CSV or by factory
• MarketDataFactory can
• Query quotes from a simple provider interface
• Query time-series from a simple provider interface
• Calibrate
• Create scenarios by shifting/bumping
• See SwapPricingWithCalibrationExample
MEASURES
MEASURE-LEVEL API
• Higher-level than pricers
• Stateless - takes resolved trade and any necessary market data
• Calculates for one trade and one or more sets of market data
• ie. supports scenarios
• Only operates on trades, not products
• Scaled output
• eg. PV01 in basis points
USING THE MEASURE-LEVEL API
// obtain the swap and market data to price against
ResolvedSwapTrade trade = ...
RatesProvider market = ...
// calculate the present value
MultiCurrencyAmount pv =
SwapTradeCalculations.DEFAULT
.presentValue(trade, market);
USING THE MEASURE-LEVEL API
// obtain the swap and market data to price against
ResolvedSwapTrade trade = ...
RatesMarketDataLookup lookup = ...
ScenarioMarketData market = ...
// calculate the present value for many scenarios
MultiCurrencyScenarioArray scenarioPv =
SwapTradeCalculations.DEFAULT
.presentValue(trade, lookup, market);
CALCULATIONS
CALCULATION-LEVEL API
• Highest-level API
• Calculates for many trades and one or more sets of market data
• ie. supports scenarios
• Optional currency conversion
• Multi-threaded
• Results can be received asynchronously
CALCULATION-LEVEL API
• Calculation API result is a grid
• Rows are trades, positions, or similar
• Columns are measures, such as PV, PV01, Par rate
• Mixed portfolio of trades (PV for Swap, FRA and future in one call)
NPV (USD) NPV (GBP) PV01 (USD) Par rate
Trade 1 - Swap 13,487.25 10,176.72 12.7365 0.23
Trade 2 - Swap -34,276.73 -27,273.28 76.2725 0.24
Trade 3 - FRA 12,835.26 9,263.75 -26.8367 0.31
Trade 4 - STIR -965.76 -754.23 1.2676 0.52
CALCULATIONS
• CalculationRunner is entry to Calculation API
• Provides a multi-threaded executor
• Also allow callers to use their own executor
// obtains a multithreaded runner
try (CalculationRunner runner =
CalculationRunner.ofMultiThreaded()) {
// use the runner
}
RULES
• CalculationRules defines how to calculate
• Functions mapping from trade type to code
• Reporting currency
• Market data lookup
// setup the rules
CalculationRules rules = CalculationRules.of(
StandardComponents.calculationFunctions(),
Currency.USD,
ratesMarketDataLookup);
CALCULATIONS
• Each column defined by Column
• Measure specifies what to calculate
• Can control reporting currency per column
// specify the columns
List<Column> columns = ImmutableList.of(
Column.of(Measure.PRESENT_VALUE),
Column.of(Measure.PRESENT_VALUE, Currency.GBP),
Column.of(Measure.PV01_CALIBRATED_SUM),
Column.of(Measure.PAR_RATE));
CALCULATIONS
• Calculation runner is stateless
• Pass in all inputs, get back results
• Separate API allows results to be received asynchronously
// calculate the results
Results results = runner.calculate(
rules, // How to calculate
trades, // Trades to process
columns, // Columns, eg PV, PV01, par rate
marketData, // Market data
referenceData); // Reference data
CALCULATION-LEVEL API
NPV (USD) NPV (GBP) PV01 (USD) Par rate
Trade 1 - Swap 13,487.25 10,176.72 12.7365 0.23
Trade 2 - Swap -34,276.73 -27,273.28 76.2725 0.24
Trade 3 - FRA 12,835.26 9,263.75 -26.8367 0.31
Trade 4 - STIR -965.76 -754.23 1.2676 0.52
... ... ... ... ...
SUMMARY
STRATA v1.2
• Trades are immutable beans
• Pricing/risk logic is stateless, and separate from the trades
• Three levels of pricing/risk API
• Pricer - one trade, one set of market data
• Measure - one trade, one or many sets of market data
• Calc - many trades, one or many sets of market data
STRATA v1.2
• Modern market risk library in Java 8
• Lightweight and easy-to-use, lots of examples
• Good asset class coverage, lots of built-in conventions
• Open source, Apache v2 license
• Foundation of commercial products
• cloud-based calculations for derivatives trading
• Commercial support available from OpenGamma
http://strata.opengamma.io/
THANK YOU

More Related Content

Similar to Strata, Open Source Market Risk

#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using GeodePivotalOpenSourceHub
 
Building Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache GeodeBuilding Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache GeodeAndre Langevin
 
Wall Street Derivative Risk Solutions Using Apache Geode
Wall Street Derivative Risk Solutions Using Apache GeodeWall Street Derivative Risk Solutions Using Apache Geode
Wall Street Derivative Risk Solutions Using Apache GeodeAndre Langevin
 
Wall Street Derivative Risk Solutions Using Geode
Wall Street Derivative Risk Solutions Using GeodeWall Street Derivative Risk Solutions Using Geode
Wall Street Derivative Risk Solutions Using GeodeVMware Tanzu
 
WSO2 Analytics Platform: The one stop shop for all your data needs
WSO2 Analytics Platform: The one stop shop for all your data needsWSO2 Analytics Platform: The one stop shop for all your data needs
WSO2 Analytics Platform: The one stop shop for all your data needsSriskandarajah Suhothayan
 
Abc financial analyticsdemo
Abc financial analyticsdemoAbc financial analyticsdemo
Abc financial analyticsdemoGuan Khoo
 
Analytics Patterns for Your Digital Enterprise
Analytics Patterns for Your Digital EnterpriseAnalytics Patterns for Your Digital Enterprise
Analytics Patterns for Your Digital EnterpriseSriskandarajah Suhothayan
 
WSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital EnterpriseWSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital EnterpriseWSO2
 
Are You Trading Stocks Securely? Exposing Security Flaws in Trading Technologies
Are You Trading Stocks Securely? Exposing Security Flaws in Trading TechnologiesAre You Trading Stocks Securely? Exposing Security Flaws in Trading Technologies
Are You Trading Stocks Securely? Exposing Security Flaws in Trading TechnologiesAlejandro Hernández
 
[WSO2Con USA 2018] Patterns for Building Streaming Apps
[WSO2Con USA 2018] Patterns for Building Streaming Apps[WSO2Con USA 2018] Patterns for Building Streaming Apps
[WSO2Con USA 2018] Patterns for Building Streaming AppsWSO2
 
Building A Feature Factory
Building A Feature FactoryBuilding A Feature Factory
Building A Feature FactoryDatabricks
 
Quantlogic Product &amp; Services Offerring
Quantlogic Product &amp; Services OfferringQuantlogic Product &amp; Services Offerring
Quantlogic Product &amp; Services Offerringnscarr
 
Juanjo Hierro_FIWARE Marketplace and Data Publication features.pptx
Juanjo Hierro_FIWARE Marketplace and Data Publication features.pptxJuanjo Hierro_FIWARE Marketplace and Data Publication features.pptx
Juanjo Hierro_FIWARE Marketplace and Data Publication features.pptxFIWARE
 
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...WSO2
 
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...DataStax
 
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.Lucidworks
 
Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...
Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...
Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...HostedbyConfluent
 
WSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needsWSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needsSriskandarajah Suhothayan
 

Similar to Strata, Open Source Market Risk (20)

#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
 
Building Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache GeodeBuilding Wall St Risk Systems with Apache Geode
Building Wall St Risk Systems with Apache Geode
 
Wall Street Derivative Risk Solutions Using Apache Geode
Wall Street Derivative Risk Solutions Using Apache GeodeWall Street Derivative Risk Solutions Using Apache Geode
Wall Street Derivative Risk Solutions Using Apache Geode
 
Wall Street Derivative Risk Solutions Using Geode
Wall Street Derivative Risk Solutions Using GeodeWall Street Derivative Risk Solutions Using Geode
Wall Street Derivative Risk Solutions Using Geode
 
WSO2 Analytics Platform: The one stop shop for all your data needs
WSO2 Analytics Platform: The one stop shop for all your data needsWSO2 Analytics Platform: The one stop shop for all your data needs
WSO2 Analytics Platform: The one stop shop for all your data needs
 
Abc financial analyticsdemo
Abc financial analyticsdemoAbc financial analyticsdemo
Abc financial analyticsdemo
 
Analytics Patterns for Your Digital Enterprise
Analytics Patterns for Your Digital EnterpriseAnalytics Patterns for Your Digital Enterprise
Analytics Patterns for Your Digital Enterprise
 
WSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital EnterpriseWSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
WSO2Con USA 2017: Analytics Patterns for Your Digital Enterprise
 
Are You Trading Stocks Securely? Exposing Security Flaws in Trading Technologies
Are You Trading Stocks Securely? Exposing Security Flaws in Trading TechnologiesAre You Trading Stocks Securely? Exposing Security Flaws in Trading Technologies
Are You Trading Stocks Securely? Exposing Security Flaws in Trading Technologies
 
[WSO2Con USA 2018] Patterns for Building Streaming Apps
[WSO2Con USA 2018] Patterns for Building Streaming Apps[WSO2Con USA 2018] Patterns for Building Streaming Apps
[WSO2Con USA 2018] Patterns for Building Streaming Apps
 
Building A Feature Factory
Building A Feature FactoryBuilding A Feature Factory
Building A Feature Factory
 
Quantlogic Product &amp; Services Offerring
Quantlogic Product &amp; Services OfferringQuantlogic Product &amp; Services Offerring
Quantlogic Product &amp; Services Offerring
 
Juanjo Hierro_FIWARE Marketplace and Data Publication features.pptx
Juanjo Hierro_FIWARE Marketplace and Data Publication features.pptxJuanjo Hierro_FIWARE Marketplace and Data Publication features.pptx
Juanjo Hierro_FIWARE Marketplace and Data Publication features.pptx
 
Ucits
UcitsUcits
Ucits
 
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
WSO2Con USA 2015: WSO2 Analytics Platform - The One Stop Shop for All Your Da...
 
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
Real Time Business Intelligence with Cassandra, Kafka and Hadoop - A Real Sto...
 
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
 
Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...
Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...
Reigning in Protobuf with David Navalho and Graham Stirling | Kafka Summit Lo...
 
WSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needsWSO2 Analytics Platform - The one stop shop for all your data needs
WSO2 Analytics Platform - The one stop shop for all your data needs
 
Patterns for Building Streaming Apps
Patterns for Building Streaming AppsPatterns for Building Streaming Apps
Patterns for Building Streaming Apps
 

More from Stephen Colebourne

Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Stephen Colebourne
 
Amber and beyond: Java language changes
Amber and beyond: Java language changesAmber and beyond: Java language changes
Amber and beyond: Java language changesStephen Colebourne
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionStephen Colebourne
 

More from Stephen Colebourne (6)

Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)Java SE 9 modules - an introduction (July 2018)
Java SE 9 modules - an introduction (July 2018)
 
Amber and beyond: Java language changes
Amber and beyond: Java language changesAmber and beyond: Java language changes
Amber and beyond: Java language changes
 
Java SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introductionJava SE 9 modules (JPMS) - an introduction
Java SE 9 modules (JPMS) - an introduction
 
Java SE 8 library design
Java SE 8 library designJava SE 8 library design
Java SE 8 library design
 
Code generating beans in Java
Code generating beans in JavaCode generating beans in Java
Code generating beans in Java
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 

Recently uploaded

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 

Recently uploaded (20)

What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 

Strata, Open Source Market Risk

  • 2. STEPHEN COLEBOURNE • Java Champion, regular conference speaker • Best known for date & time - Joda-Time and JSR-310 • More Joda projects - http://www.joda.org • Major contributions in Apache Commons • Blog - http://blog.joda.org • Worked at OpenGamma for 6 years
  • 3. OPENGAMMA • Founded in 2009 • Financed by Venture Capital • Mission to bring Open Source values to finance industry • Focus on Market Risk Analytics, Derivatives and Clearing • Cloud-based offering coming soon
  • 5. MARKET RISK • Providing pricing and analytics on a financial portfolio • “present value (NPV) of an interest rate swap” • “PV01 of a forward rate agreement (FRA)” • “vega and gamma of an FX vanilla option” • “examine the portfolio against a set of scenarios”
  • 6. COMPONENTS FOR MARKET RISK • Pricing/Analytic models • Trade representations - for each supported asset class • Market data representations - quotes, curves, surfaces, etc. • Calibration - curves, surfaces, etc. • Market data management and Scenario creation • Reference data - holiday calendars, securities • Basics - schedules, day counts, currencies, etc.
  • 7. BUILD, BUY OR OPEN SOURCE? • Build it in-house • Buy from a vendor • Open Source • QuantLib (C++, with exports to other languages) • Strata (Java/JVM)
  • 9. OVERVIEW • Open Source - Apache v2 license • Lightweight, easy-to-use library • Just jar files - no servers or databases needed • Released in Maven Central • Foundation for OpenGamma commercial products
  • 10. Commons Trade Model Market Data Pricing & Analytics Measures Data Mgmt Business day conventions, currencies, day counts, holidays, identifiers, indices, roll conventions, time-series Products, trades, securities Built-in pricers Sensitivities Curve framework Interpolators Calculation API, scenarios, job execution Calc functions Market Data API Data sourcing Scenarios Live data providers Data sources Loaders Source integration Holiday calendars Day counts Currencies Asset classes Indices Pricers Market data types Perturbations Config types Filters Measures Reporting Simple, yet powerful, reporting facilities Report templates
  • 11. QUICK START • Built in examples • Up and running in minutes • Hard coded reference data • Holidays, indices, conventions • Simple command line reporting
  • 12.
  • 13. JAVA 8 • Early decision to use Java 8 for Strata • Features very beneficial for Market Risk Analytics • Date and Time • Streams and Lambdas • Methods on interfaces • Affects both macro-level design and micro-level code
  • 14. DEPENDENCIES • Guava • Joda-Beans • Joda-Convert • SLF4J • Commons-Math • Colt
  • 15. MODULES • strata-collect - low-level, arrays, time-series, IO, tuples • strata-basics - holidays, schedules, indices, reference data • strata-data - market data containers • strata-market - market data structures - curves, surfaces, etc • strata-product - trades, products, securities • strata-loader - data loaders from csv and xml • strata-pricer - analytic pricers • strata-calc - calculation engine, scenarios, market data building • strata-measure - high-level measures, potentially multi-scenario
  • 17. TRADES • Trades are simple immutable beans (data objects) • Built using Joda-Beans • Use builder or static factory to create • Real properties and methods with Javadoc
  • 18. JODA-BEANS • Source code generator/regenerator • Just write the fields and add a couple of annotations • Joda-Beans generates additional high-quality source code • Mutable and immutable beans • Provides C# style properties • Easy and fast serialization to XML, JSON, Binary
  • 19. JODA-BEANS @BeanDefinition public final class Person implements ImmutableBean { @PropertyDefinition(validate = “notNull”) private final String forename; @PropertyDefinition(validate = “notNull”) private final String surname; // autogenerated getters, equals, hashCode, // toString, builder, metabean }
  • 20. TRADES AND PRODUCTS • Trade • Trade date • Trade identifier • Counterparty • Product • Financial details of the trade • Effective/Termination date, notional, rate, index, etc.
  • 22. FRA // create Fra using builder Fra fra = Fra.builder() .buySell(BuySell.BUY) // Buy .index(IborIndices.GBP_LIBOR_3M) // GBP LIBOR 3M .notional(10_000_000) // 10 million GBP .fixedRate(0.0085) // 0.85% .startDate(LocalDate.of(2016, 9, 14)) .endDate(LocalDate.of(2016, 12, 14)) .build();
  • 23. FRA // create FraTrade Fra fra = ... TradeInfo info = TradeInfo.builder() .tradeDate(LocalDate.of(2016, 6, 14)) .id(StandardId.of(“Trade”, “123456”)) .counterparty(StandardId.of(“Party”, “654321”)) .build(); FraTrade trade = FraTrade.of(info, fra);
  • 24. CONVENTIONS • Most OTC trades follow market conventions • Strata includes definitions of some of these conventions • Avoids repetitive code
  • 25. FRA CONVENTION // create FRA from a convention FraTrade trade = FraConvention.of(IborIndices.GBP_LIBOR_3M) .createTrade( LocalDate.of(2015, 7, 14), // Trade date Period.ofMonths(2), // start in 2 months BuySell.BUY, // Buy 10_000_000, // 10 million GBP 0.012, // 1.2% ReferenceData.standard()); // Holiday calendars
  • 26. NOTES • Built in conventions for FRAs • Built in conventions for 18 ibor-like indices, such as GBP LIBOR • Built in conventions for 12 overnight indices, such as GBP SONIA • Built in conventions for currencies • Built in holiday calendar data, suitable for evaluation
  • 27. SWAP • Flexible interest rate swap • Fixed legs support variable interest rates and known amounts • Float legs support Ibor, Overnight and Inflation • Stubs support fixed, floating, interpolated and known amount • Support for variable notional, gearing and spread • Conventions and Templates available
  • 30. SWAP // create swap from a convention SwapTrade trade = FixedIborSwapConventions.GBP_FIXED_1Y_LIBOR_3M .createTrade( LocalDate.of(2015, 7, 14), // Trade date Tenor.TENOR_10Y, // 10 year swap BuySell.BUY, // Buy 10_000_000, // 10 million GBP 0.014, // 1.4% ReferenceData.standard()); // Holiday calendars
  • 31. SECURITIES • Two approaches supported • Define security as and when needed • Setup reference data map of securities • Provides ability to use, or avoid, a big security master
  • 33. SECURITIES AS REFERENCE DATA Trade IborFutureOption IborFuture Security IborFutureOption Security IborFuture Security SecurityTrade ReferenceData used to lookup SecurityId ReferenceData used to convert Security to Product
  • 34. ASSET CLASSES • Swaps, Swaptions, DSF, CMS, Cap/Floor • FRA, STIR futures, STIR future options • Bond, Bond futures, Bond future options • FX forward, NDF, FX swap, vanilla option, single barrier option • CDS • Term deposit, Bullet payment • Generic security, ETD future, ETD option • Additional asset classes may be for commercial customers only
  • 36. PRICERS • Lower-level analytics API • Provides ability to calculate PV, sensitivities, greeks, etc. • Explain facility to understand how result was calculated • Operates on resolved trades/products
  • 37. RESOLVING • Resolving the trade requires reference data • Locks in dates to the current holiday calendar rules • Standard reference data contains hard coded holiday rules // resolve a swap SwapTrade trade = … ReferenceData refData = ReferenceData.standard(); ResolvedSwapTrade resolved = trade.resolve(refData);
  • 38. RESOLVING Swap SwapLegSwapTrade Trade resolved using ReferenceData Resolved SwapTrade Resolved Swap Resolved SwapLeg Resolved leg contains full list of accrual/payment periods, stubs and notional exchange
  • 39. USING A PRICER • Stateless - takes resolved trade and any necessary market data • Calculates for one trade and one set of market data • Can usually price at trade or product level
  • 40. USING A PRICER // obtain the swap and market data to price against ResolvedSwapTrade trade = ... RatesProvider market = ... // calculate the present value MultiCurrencyAmount pv = DiscountingSwapTradePricer.DEFAULT .presentValue(trade, market);
  • 42. MARKET DATA • Support for all kinds of market data • Built in classes for FX, quotes, curves, surfaces, etc. • Many types can be loaded from CSV • Multi-curve rates calibration • Scenarios, stored efficiently as arrays
  • 43. RATES PROVIDER • RatesProvider is a single, coherent, set of market data • FX rates, Discount factors, Ibor rates • Overnight rates, Inflation price indices, Historic fixings // get discount factors for GBP DiscountFactors df = ratesProvider.discountFactors(GBP); double factor = df.discountFactor(date);
  • 44. MARKET DATA • MarketData is a container of market data • Hash-map like • Keys are MarketDataId<T> // get curve by identifier CurveId id = CurveId.of(“Default”, “USD-DSC”); Curve curve = marketData.getValue(id);
  • 45. SCENARIO MARKET DATA • ScenarioMarketData is a container of scenario data • Hash-map like, where values are arrays • Keys are MarketDataId<T> // get curves by identifier CurveId id = CurveId.of(“Default”, “USD-DSC”); MarketDataBox<Curve> curves = scenarioData.getValue(id); // process using a stream (for example) curves.stream().forEach( curve -> … );
  • 46. MARKET DATA LOOKUP • Market data containers hold arbitrary sets of market data • May hold multiple USD discounting curves • RatesMarketDataLookup is used to select a coherent set CurveId usdDscId = CurveId.of(“Default”, “USD-DSC”); CurveId usdLiborId = CurveId.of(“Default”, “USD-LIBOR”); // map currency/index to curve RatesMarketDataLookup md = RatesMarketDataLookup.of( ImmutableMap.of(Currency.USD, usdDscId), ImmutableMap.of( IborIndices.USD_LIBOR_3M, usdLiborId), IborIndices.USD_LIBOR_6M, usdLiborId));
  • 47. COMBINATIONS MarketData RatesProviderRatesMarketDataLookup+ = • Many curves • Keyed by curve ID • Map currency to curve ID • Map index to curve ID • DF by currency+date • Rate by index+date
  • 48. MARKET DATA BUILDING • Can create market data manually, loading from CSV or by factory • MarketDataFactory can • Query quotes from a simple provider interface • Query time-series from a simple provider interface • Calibrate • Create scenarios by shifting/bumping • See SwapPricingWithCalibrationExample
  • 50. MEASURE-LEVEL API • Higher-level than pricers • Stateless - takes resolved trade and any necessary market data • Calculates for one trade and one or more sets of market data • ie. supports scenarios • Only operates on trades, not products • Scaled output • eg. PV01 in basis points
  • 51. USING THE MEASURE-LEVEL API // obtain the swap and market data to price against ResolvedSwapTrade trade = ... RatesProvider market = ... // calculate the present value MultiCurrencyAmount pv = SwapTradeCalculations.DEFAULT .presentValue(trade, market);
  • 52. USING THE MEASURE-LEVEL API // obtain the swap and market data to price against ResolvedSwapTrade trade = ... RatesMarketDataLookup lookup = ... ScenarioMarketData market = ... // calculate the present value for many scenarios MultiCurrencyScenarioArray scenarioPv = SwapTradeCalculations.DEFAULT .presentValue(trade, lookup, market);
  • 54. CALCULATION-LEVEL API • Highest-level API • Calculates for many trades and one or more sets of market data • ie. supports scenarios • Optional currency conversion • Multi-threaded • Results can be received asynchronously
  • 55. CALCULATION-LEVEL API • Calculation API result is a grid • Rows are trades, positions, or similar • Columns are measures, such as PV, PV01, Par rate • Mixed portfolio of trades (PV for Swap, FRA and future in one call) NPV (USD) NPV (GBP) PV01 (USD) Par rate Trade 1 - Swap 13,487.25 10,176.72 12.7365 0.23 Trade 2 - Swap -34,276.73 -27,273.28 76.2725 0.24 Trade 3 - FRA 12,835.26 9,263.75 -26.8367 0.31 Trade 4 - STIR -965.76 -754.23 1.2676 0.52
  • 56. CALCULATIONS • CalculationRunner is entry to Calculation API • Provides a multi-threaded executor • Also allow callers to use their own executor // obtains a multithreaded runner try (CalculationRunner runner = CalculationRunner.ofMultiThreaded()) { // use the runner }
  • 57. RULES • CalculationRules defines how to calculate • Functions mapping from trade type to code • Reporting currency • Market data lookup // setup the rules CalculationRules rules = CalculationRules.of( StandardComponents.calculationFunctions(), Currency.USD, ratesMarketDataLookup);
  • 58. CALCULATIONS • Each column defined by Column • Measure specifies what to calculate • Can control reporting currency per column // specify the columns List<Column> columns = ImmutableList.of( Column.of(Measure.PRESENT_VALUE), Column.of(Measure.PRESENT_VALUE, Currency.GBP), Column.of(Measure.PV01_CALIBRATED_SUM), Column.of(Measure.PAR_RATE));
  • 59. CALCULATIONS • Calculation runner is stateless • Pass in all inputs, get back results • Separate API allows results to be received asynchronously // calculate the results Results results = runner.calculate( rules, // How to calculate trades, // Trades to process columns, // Columns, eg PV, PV01, par rate marketData, // Market data referenceData); // Reference data
  • 60. CALCULATION-LEVEL API NPV (USD) NPV (GBP) PV01 (USD) Par rate Trade 1 - Swap 13,487.25 10,176.72 12.7365 0.23 Trade 2 - Swap -34,276.73 -27,273.28 76.2725 0.24 Trade 3 - FRA 12,835.26 9,263.75 -26.8367 0.31 Trade 4 - STIR -965.76 -754.23 1.2676 0.52 ... ... ... ... ...
  • 62. STRATA v1.2 • Trades are immutable beans • Pricing/risk logic is stateless, and separate from the trades • Three levels of pricing/risk API • Pricer - one trade, one set of market data • Measure - one trade, one or many sets of market data • Calc - many trades, one or many sets of market data
  • 63. STRATA v1.2 • Modern market risk library in Java 8 • Lightweight and easy-to-use, lots of examples • Good asset class coverage, lots of built-in conventions • Open source, Apache v2 license • Foundation of commercial products • cloud-based calculations for derivatives trading • Commercial support available from OpenGamma http://strata.opengamma.io/