CreateSyntheticOption
Author: Partha
Creation Date: 9/22/2019 3:59 AM
profile picture

Partha

#1
Two questions related to CreateSyntheticOption

1) How do I find out what is the value of the Volatility used in calculations in the CreateSyntheticOption method?

2) How do I output the greeks?

I am using this code to calculate the fair value and I get a different answer compared to the formula in

https://www.optionseducation.org/toolsoptionquotes/optionscalculator


CODE:
Please log in to see this code.
profile picture

Eugene

#2
Your code creates synthetic puts. An important note in the Open Issues list regarding puts:

QUOTE:
Synthetic option issues:
The OHLC values of synthetic put contracts are incorrect (unlike calls) To be fixed in WL 6.9.21
If the price of the underlying is above the Put's strike prior to bar 30, then the Put is priced at zero. The opposite is true for calls.


So I'd recommend that you wait for build 6.9.21 which fixes puts.

CreateSyntheticOption is built upon Black Scholes model. You can find one in Community Components: Black Scholes formula. Greeks is a question of its own but its output isn't supported by WL.
profile picture

Eugene

#3
While not directly related, you might derive some great Strategy code examples and explanations from these topics:

How to code "nearest term ATM call option"?
Backtesting historic predictions of optionable stocks
profile picture

Partha

#4
Thanks Eugene....very helpful resources indeed...when we call the method CreateSyntheticOption
what value of V Volatility, % is passed in the Black Scholes model by WL?
profile picture

Eugene

#5
When CreateSyntheticOption is called, the volatility parameter in the Black Scholes formula depends on the 30-period Historical Volatility DataSeries. It's not a fixed percent because it varies on a bar by bar basis.
profile picture

Partha

#6
thanks thatz what I needed
profile picture

Eugene

#7
Glad to help you.
profile picture

Partha

#8
Eugene,

Ref http://www2.wealth-lab.com/WL5WIKI/HV.ashx

In the formula below, Span is 262...why is that?

DataSeries HV1 = HV.Series( Average, 20, 262 ); HV1.Description = "HV of Average Price";
profile picture

Eugene

#9
262 is roughly the number of trading days in a year (EOD data). Note that further discussion of this indicator would be offtopic here.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).