@@ -129,26 +129,26 @@ public override void ComparesAgainstExternalDataAfterReset()
129
129
// Not used
130
130
}
131
131
132
- [ TestCase ( 27.50 , 450.0 , OptionRight . Call , 60 , 0.084 ) ]
133
- [ TestCase ( 29.35 , 450.0 , OptionRight . Put , 60 , 0.093 ) ]
134
- [ TestCase ( 37.86 , 470.0 , OptionRight . Call , 60 , 0.021 ) ]
135
- [ TestCase ( 5.74 , 470.0 , OptionRight . Put , 60 , 0.0 ) ] // Volatility of deep OTM American put option will not converge in CRR model
136
- [ TestCase ( 3.44 , 430.0 , OptionRight . Call , 60 , 0.026 ) ]
137
- [ TestCase ( 40.13 , 430.0 , OptionRight . Put , 60 , 0.189 ) ]
138
- [ TestCase ( 17.74 , 450.0 , OptionRight . Call , 180 , 0.014 ) ]
139
- [ TestCase ( 19.72 , 450.0 , OptionRight . Put , 180 , 0.040 ) ]
140
- [ TestCase ( 38.45 , 470.0 , OptionRight . Call , 180 , 0.038 ) ]
141
- [ TestCase ( 0.43 , 470.0 , OptionRight . Put , 180 , 0.0 ) ] // Volatility of deep OTM American put option will not converge in CRR model
142
- [ TestCase ( 1.73 , 430.0 , OptionRight . Call , 180 , 0.016 ) ]
143
- [ TestCase ( 12.46 , 430.0 , OptionRight . Put , 180 , 0.072 ) ]
132
+ [ TestCase ( 27.50 , 450.0 , OptionRight . Call , 60 , 0.304 ) ]
133
+ [ TestCase ( 29.35 , 450.0 , OptionRight . Put , 60 , 0.511 ) ]
134
+ [ TestCase ( 37.86 , 470.0 , OptionRight . Call , 60 , 0.273 ) ]
135
+ [ TestCase ( 5.74 , 470.0 , OptionRight . Put , 60 , 0.204 ) ] // Volatility of deep OTM American put option will not converge in CRR model
136
+ [ TestCase ( 3.44 , 430.0 , OptionRight . Call , 60 , 0.131 ) ]
137
+ [ TestCase ( 40.13 , 430.0 , OptionRight . Put , 60 , 0.541 ) ]
138
+ [ TestCase ( 17.74 , 450.0 , OptionRight . Call , 180 , 0.093 ) ]
139
+ [ TestCase ( 19.72 , 450.0 , OptionRight . Put , 180 , 0.208 ) ]
140
+ [ TestCase ( 38.45 , 470.0 , OptionRight . Call , 180 , 0.134 ) ]
141
+ [ TestCase ( 0.43 , 470.0 , OptionRight . Put , 180 , 0.056 ) ] // Volatility of deep OTM American put option will not converge in CRR model
142
+ [ TestCase ( 1.73 , 430.0 , OptionRight . Call , 180 , 0.045 ) ]
143
+ [ TestCase ( 12.46 , 430.0 , OptionRight . Put , 180 , 0.0 ) ]
144
144
public void ComparesIVOnCRRModel ( decimal price , decimal spotPrice , OptionRight right , int expiry , double refIV )
145
145
{
146
146
// Under CRR framework
147
147
var symbol = Symbol . CreateOption ( "SPY" , Market . USA , OptionStyle . American , right , 450m , _reference . AddDays ( expiry ) ) ;
148
- var indicator = new ImpliedVolatility ( _symbol , 0.04m , optionModel : OptionPricingModelType . BinomialCoxRossRubinstein ) ;
148
+ var indicator = new ImpliedVolatility ( symbol , 0.04m , optionModel : OptionPricingModelType . BinomialCoxRossRubinstein ) ;
149
149
150
- var optionTradeBar = new TradeBar ( _reference , _symbol , price , price , price , price , 0m ) ;
151
- var spotTradeBar = new TradeBar ( _reference , _underlying , spotPrice , spotPrice , spotPrice , spotPrice , 0m ) ;
150
+ var optionTradeBar = new TradeBar ( _reference , symbol , price , price , price , price , 0m ) ;
151
+ var spotTradeBar = new TradeBar ( _reference , symbol . Underlying , spotPrice , spotPrice , spotPrice , spotPrice , 0m ) ;
152
152
indicator . Update ( optionTradeBar ) ;
153
153
indicator . Update ( spotTradeBar ) ;
154
154
0 commit comments