Does anyone know if the Options module of WL allows you to say, sell a straddle in an index every Monday and hold to expiration or explore other stop measures? I've only used WL for equity backtesting.
Thanks!
Size:
Color:
Size:
Color:
So what's the use of getting historical options data if you can't test it?
Size:
Color:
Are you asking me or was your question rhetorical? I have created a data provider for a 3rd party feed that delivers options data among the rest (i.e. a side effect). We never positioned WL as options-enabled product. The rest is up to the users willing to program their options logic. It's not impossible - just should be complex enough:
ChartScript Family - Option Scripts
Size:
Color:
Hi,
I tried to program a options straddle strategy, but somehow, it always sells after 2 days and not at profit target. Can anybody help out and finds the error? I believe it has something to do with Active Positions...but not sure. Tried to set the profit target manually in many ways, but always same results.
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
it always sells after 2 days and not at profit target.
That's right. There are several problems with the code that leads to this:
1. Your system is programmed to unconditionally exit both the call and put AtMarket (a check is missing for AtLimit triggering?)
2. Accessing LastPosition typically should not be used in a multi-Position strategy:
CODE:
Please log in to see this code.
Generally, setting context when exiting a Position isn't required:
CODE:
Please log in to see this code.
Since the exit logic is indistinguishable for both sell blocks except the signal name, it'd make sense to exit both positions at once using Position.AllPositions (for example).
I'm not sure if my attempt below is correct as it follows your system's logic. Could you clarify it for me?
CODE:
Please log in to see this code.
Size:
Color: