WL 6.9: Synthetic Options Contract Reference
Author: richard1000
Creation Date: 11/18/2015 11:12 AM
profile picture

richard1000

#1
I don't see the QuickRef > Options chapter in WLP v6.9.12.
profile picture

LenMoz

#2
The "What's new" block of the WLP home page states
QUOTE:
Wealth-Lab Pro 6.9 is now available
Wealth-Lab Pro® 6.9 is a maintenance release that includes backend changes for Fundamental Data Providers. If you use any of the Fundamental Data Providers please upgrade to continue receiving data updates from these data providers.
Nothing about synthetic options. This, the backout of an optimization enhancement, and a Fidelity phone call lead me to believe that improvement functionality has been delayed and this is, indeed, only a maintenance release. A phone call to Fidelity Active Trader Services 877-907-4429 could definitively answer your question.
profile picture

Eugene

#3
As we believed, 6.9 should introduce the possibility to create a synthetic option contract's historical data based on the Black-Scholes model and use it to backtest option trading strategies.
profile picture

Eugene

#4
As it turns out, the User Guide is correct in what it says: 6.9.12 is only a maintenance release. The support for synthetic options and other enhancements are coming later this year (hopefully). Sorry for the inconvenience.
profile picture

ReneW

#5
Is there a way to control the WL function
"CreateSyntheticOption" regarding exact days to expiration and implied volatility ?

After the following line:

CODE:
Please log in to see this code.


I could imagine overwriting the contracts open/close data
with self-calculated values.

Is there any other, much more elegant way ?


Rene
profile picture

Eugene

#6
To invoke QuickRef where every supported WealthScript function is documented, strike F11. Notice there are two ways to invoke the method:

CODE:
Please log in to see this code.


Implied volatility is not an option (no pun intended).
profile picture

pscanlon1

#7
I see that there are two functions,

Bars.AddOptionsContract
Bars.GetOptionsContract

They are not coming up in the reference. Are they related to being able to create options as a user?
profile picture

Eugene

#8
Please follow this as a rule of thumb when discovering an 'undocumented' method: Is there a documentation for WealthLab.dll class procedures and methods? In short, 'it doesn't exist'. Whatever you need is documented in the QuickRef.
profile picture

Cone

#9
QUOTE:
Whatever you need is documented in the QuickRef.
Specifically, see the "Options" category in the QuickRef (F11).

Also, Help > WealthScript Programming Guide: Programming Trading Strategies > Options Strategies
profile picture

Eugene

#10
jschneir's post moved from a different thread:

Hello,

I've been working with synthetic options for a few days now, and had several questions regarding how they function that I could not find in previous forum posts, nor the reference or programming guides.

1) With synthetic options, how is the YYMMDD derived within the components & is this indicative of the values that are actually passed to the calculation (meaning if it states a strike of $40 on date X, is that actually what is used within the black scholles model? I've messed around using 7 day parameters, and this component would still show about 1 month out)

2) What does daysToPlotBeforeCreation exactly mean (I could find no explanation of what this was)?

3) How do the calculations work given the inputs, (I ask because in code that I'm currently working with, it appears to work fine 80% of the time, and then every so often it assumes an entry price of <$0.01 on a contract, which does not make much sense)

If this is answered elsewhere please feel free to point me towards this.

Thanks
Jordan
profile picture

Eugene

#11
Hi Jordan,

1) If you're asking about the YYMMDD in the contract's name, then it's the usual expiration date on the third Friday.

2) According to the QuickRef, it's the number of calendar days to plot before creation date.

3) A more focused question is how does your code look like and what stock and date range is it applied to. Please provide a clear & reproducible example of your 20% case.
profile picture

jschneir

#12
Thanks Eugene couple of clarifications:

1) Does this have any bearing on the actual values passed through to the formula (IE if I chose 7 days for both of my parameters, it still gives me the same 3rd Friday. So is it actually using the dates from the 3rd Friday or the parameters I feed it?)

2) I saw this in the QuicikRef, but I need some clarification on what exactly that means. What would it be plotting and is it the creation date of the contract? Moreso, why is this relevant?

3) I've listed the code I'm working with below. If you employ symbol TZA for a 1 minute time frame for the date range of 06/10/2015 - 06/13/2015 it yields an order of 181,823 contracts:

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

Eugene

#13
QUOTE:
3) I've listed the code I'm working with below. If you employ symbol TZA for a 1 minute time frame for the date range of 06/10/2015 - 06/13/2015 it yields an order of 181,823 contracts:

So the contract's price must be very low. This is possible. What makes you think that it does not make much sense?

QUOTE:
What would it be plotting and is it the creation date of the contract?

The creation date aka as of bar is the "bar" in your code example:
CODE:
Please log in to see this code.


Follow the QuickRef example to visualize what would be plotted.
profile picture

jschneir

#14
QUOTE:
So the contract's price must be very low. This is possible. What makes you think that it does not make much sense?


06/12/2015 was a Tuesday, and the symbols price range was from 37.52 - 38.08. The symbol it chose was !TZA_37.00_150717_PUT. If the parameters I set noted at least 30 days until next expiration, and the strike price is very close to the current price, it should not calculate close to a 0 value for the contract unless the implied volatility or some other input was effectively 0 (in part why I asked how the calculations function).

Edit:

I'm also noticing that the price of the Entry and Exit seems to increase as I use larger time intervals. To me this implies that the underlying calculations are a function of the time intervals chosen.
profile picture

Eugene

#15
kbellare asked in an essentially duplicate thread:

I tried changing the expiry date and strike price in CreateSyntheticOption() in the sample code provided (WealthScript Programming Guide > Programming Trading Strategies > Options Strategies > Example #1), but there's no change to the graphs.
CODE:
Please log in to see this code.


A) what does the 30 in Expiry date represent? Is it 30 days from the start date? The type is Date Time, so not sure. Why are 1 and 2 yielding almost same graphs?
B) changing strike price to 120 should make the option in the money in increase the value, but no change in price chart. Why is that?
profile picture

Eugene

#16
A) As you could find in the QuickRef, int atLeastXDaysTilExpiration is the number of calendar days to allow until expiration. The type is not DateTime: see the overload syntax.