Profile Picture

ArgumentOutOfRangeException by GetEuropeanPutPrice and GetEuropeanCallPrice

Posted By tikelentrik 6 Years Ago

ArgumentOutOfRangeException by GetEuropeanPutPrice and...

Message
Posted Tuesday October 18 2011
Hi,

i was trying to use the GetEuropeanPutPrice and GetEuropeanCallPrice but i get a ArgumentOutOfRangeException is this a internal error or something i have done wrong?

(my vs2005 is a dutch version like you can see)

System.ArgumentOutOfRangeException: De index valt buiten het bereik. Deze mag niet negatief zijn en moet kleiner zijn dan de grootte van de verzameling.
Parameternaam: index
bij System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bij System.ThrowHelper.ThrowArgumentOutOfRangeException()
bij System.Collections.Generic.List`1.set_Item(Int32 index, T value)
bij RightEdge.Common.OptionCalculator.xd6fe344591fce991(Double x1d65faa42f6259ad, Double xa5425e8080c3dd15, Double x462676cf4d8f618c, Double x36ad99fb5e33a839, Double x0ebe150470f7718d)
bij RightEdge.Common.OptionCalculator.GetEuropeanPutPrice(Double assetPrice, Double strikePrice, Int32 expirationMonth, Int32 expirationYear)
bij TEST_Options_GUI.Form1.TestREOptionsCalc() in D:\Trading SoftWare\Options\TEST Options GUI\Forms\Form1.vb:regel 17

Thanks,
TikElentrik.

Posted Tuesday October 18 2011
tikelentrik (10/18/2011)
Hi,

i was trying to use the GetEuropeanPutPrice and GetEuropeanCallPrice but i get a ArgumentOutOfRangeException is this a internal error or something i have done wrong?

(my vs2005 is a dutch version like you can see)

System.ArgumentOutOfRangeException: De index valt buiten het bereik. Deze mag niet negatief zijn en moet kleiner zijn dan de grootte van de verzameling.
Parameternaam: index
bij System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
bij System.ThrowHelper.ThrowArgumentOutOfRangeException()
bij System.Collections.Generic.List`1.set_Item(Int32 index, T value)
bij RightEdge.Common.OptionCalculator.xd6fe344591fce991(Double x1d65faa42f6259ad, Double xa5425e8080c3dd15, Double x462676cf4d8f618c, Double x36ad99fb5e33a839, Double x0ebe150470f7718d)
bij RightEdge.Common.OptionCalculator.GetEuropeanPutPrice(Double assetPrice, Double strikePrice, Int32 expirationMonth, Int32 expirationYear)
bij TEST_Options_GUI.Form1.TestREOptionsCalc() in D:\Trading SoftWare\Options\TEST Options GUI\Forms\Form1.vb:regel 17

Thanks,
TikElentrik.



Forgot to add the code i used

Dim oc As New RightEdge.Common.OptionCalculator
Dim optionPrice As Double

oc.HistoricalVolatility = (34.184 / 100) '18/10/2011 13u27
oc.InterestRate = (1.5 / 100)
'EuropeanStyle
optionPrice = oc.GetEuropeanCallPrice(297, 305, 11, 2011) 'Get an error here
optionPrice = oc.GetEuropeanPutPrice(297, 305, 11, 2011) 'And here
'AmericanStyle
optionPrice = oc.GetAmericanCallPrice(297, 305, 11, 2011) 'But Not here
optionPrice = oc.GetAmericanPutPrice(297, 305, 11, 2011) 'and NOT here

Posted Tuesday October 18 2011
This is a bug. I've already identified and addressed it. If you're using build 37, I can furnish an update for you to test if you're interested.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems