parseResults
Class: numerix
Converts Numerix CAIL data to MATLAB data types
Syntax
R = parseResults(N,Results)
Description
R = parseResults(N,Results) returns Numerix® CAIL data in native MATLAB® data types.
Input Arguments
Numerix object constructed using numerix.
Result instances for each trade instance.
Output Arguments
Results from Numerix table output represented as MATLAB data types.
Attributes
Access | public |
Static | false |
Hidden | false |
To learn about attributes of methods, see Method Attributes.
Examples
Initialize Numerix environment.
import com.numerix.integration.*; import com.numerix.integration.implementation.*; n = numerix('i:\NumeriX_java_10_3_0\data')
n =
Path: 'i:\NumeriX_java_10_3_0\data'
RepositoryPath: 'i:\NumeriX_java_10_3_0\data\Repository'
Repository: [1x1 com.numerix.integration.implementation.FileSystemRepository]
Context: [1x1 com.numerix.integration.implementation.LocalCalculationContext]
LookupsPath: 'i:\NumeriX_java_10_3_0\data\Data\LookupRules'
MarketsPath: 'i:\NumeriX_java_10_3_0\data\Data\Markets'
FixingsPath: 'i:\NumeriX_java_10_3_0\data\Data\Fixings'
TradesPath: 'i:\NumeriX_java_10_3_0\data\Data\Trades'
Parameters: [1x1 com.numerix.integration.implementation.CalculationParameters]Create a market.
quotes = java.util.HashMap; quotes.put('IR.USD-LIBOR-3M.SWAP-1Y.MID', 0.0066056); quotes.put('IR.USD-LIBOR-3M.SWAP-10Y.MID', 0.022465005); quotes.put('IR.USD-LIBOR-3M.SWAP-20Y.MID', 0.027544995); market = Market('EOD_14-NOV-2011', DateExtensions.date('14-Nov-2011'), quotes.entrySet);
Define a trade instance based on instrument template found in the
Repository.
tradeDescriptor = 'TRADE.IR.CALLABLEREVERSEFLOATER'; tradeParameters = java.util.HashMap; tradeParameters.put('Trade ID','1001'); tradeParameters.put('Quote Type', 'MID'); tradeParameters.put('Currency', 'USD'); tradeParameters.put('Notional', 1000000.0); tradeParameters.put('Effective Date', DateExtensions.date('1-Dec-2011')); tradeParameters.put('Termination Date', DateExtensions.date('1-Dec-2021')); tradeParameters.put('IR Index', 'LIBOR'); tradeParameters.put('IR Index Tenor', '3M'); tradeParameters.put('Structured Freq', '3M'); tradeParameters.put('Structured Side', 'Receive'); tradeParameters.put('Structured Coupon Floor', 0.0); tradeParameters.put('Structured Coupon UpBd', 0.08); tradeParameters.put('StructuredCoupon Multiplier', 1.4); tradeParameters.put('Structured Coupon Cap', 0.05); tradeParameters.put('Structured Basis', 'ACT/360'); tradeParameters.put('Funding Freq', '3M'); tradeParameters.put('Funding Side', 'Pay'); tradeParameters.put('Funding Spread', 0.003); tradeParameters.put('Funding Basis', 'ACT/360'); tradeParameters.put('Call Start Date', DateExtensions.date('1-Dec-2013')); tradeParameters.put('Call End Date', DateExtensions.date('1-Dec-2020')); tradeParameters.put('Option Side', 'Short'); tradeParameters.put('Option Type', 'Right to Terminate'); tradeParameters.put('Call Frequency', '3M'); tradeParameters.put('Model', 'IR.USD-LIBOR-3M.MID.DET'); tradeParameters.put('Method', 'BackwardAnalytic');
Create a trade instance.
trade = RepositoryExtensions.createTradeInstance(n.Repository, tradeDescriptor, tradeParameters);
Price the trades.
results = CalculationContextExtensions.calculate(n.Context, trade, market, Request.getAll);
Parse the results for MATLAB and display.
r = n.parseResults(results) disp([r.Name r.Category r.Currency r.Data])
r =
Category: {13x1 cell}
Currency: {13x1 cell}
Name: {13x1 cell}
Data: {13x1 cell}
'Reporting Currency' 'Price' '' 'USD'
'Structured Cashflow Log' 'Cashflow' '' {41x20 cell}
'Structured Leg PV Accrued' 'Price' 'USD' [ 0]
'PV' 'Price' 'USD' [ 6.4133e+04]
'Structured Leg PV Clean' 'Price' 'USD' [ 4.2637e+05]
'Option PV' 'Price' 'USD' [-1.3220e+05]
'Funding Cashflow Log' 'Cashflow' '' {41x20 cell}
'Structured Leg PV' 'Price' 'USD' [ 4.2637e+05]
'Funding Leg PV' 'Price' 'USD' [-2.3004e+05]
'Funding Leg PV Accrued' 'Price' 'USD' [ 0]
'Funding Leg PV Clean' 'Price' 'USD' [-2.3004e+05]
'Yield Risk Report' '' '' { 4x30 cell}
'Messages' '' '' { 4x1 cell}Version History
Introduced in R2013b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)