Cannot explain the price of a synthetic option
Author: DamV
Creation Date: 3/6/2017 9:00 PM
profile picture

DamV

#1
I have a recurrent issue with the theorical price of a Call or Put.
Example 1: the price is the price at expiration (so often 0)
Example 2: a correct price only at bar+1

It's clearly wrong. Any idea?


CODE:
Please log in to see this code.


Log result in daily scale:

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

Eugene

#2
1. So what is wrong here, the option price after expiration i.e. contract.Close[bar+1]?

2. What do you think is clearly wrong in the 2nd example?
profile picture

DamV

#3
Ok. I understood the issue. The Series of contract starts from startDate so I was not in the same "bar".

bar,Bars.Date[bar],Close[bar],option.Date[bar],option.Close[i]
31,11/16/2016,36.8,11/21/2016,5.58850757838319

But with this shift, it's not clear the bar to use to buy.sell:

Usually we buy at bar+1 but for an option it seems incorrect:

CODE:
Please log in to see this code.


Same question to Sell?
profile picture

DamV

#4
Discard my previous post. I don't know how I had this shift. It was probably a wrong code because I can't reproduce it.

But I still have an issue about the price of an option.
I noticed that if an option is created at bar, the Close of the option is correct from bar but from 0 to bar-1 it's incorrect. From bar-1 to 0, it contains the value at the expiration, so 0 or abs(Close - strike).
Can you clarify your model because these values are incorrect.

Even if I don't need the past (bar-x), I also noticed that if at bar-1 the Close of the option was 0 ShortAtClose(bar) generates a Runtime Error (Position Entry cannot be zero) even if the Close of the option at bar is NOT zero.

CODE:
Please log in to see this code.


Here are the results if the option is created at bar=30 which is 1/30/2017

Date[30]=1/30/2017 12:00:00 AM
put.Symbol: !AAL_45.00_170317_PUT
Date Close put.Date put.Close
1/26/2017 12:00:00 AM 49.59 1/26/2017 12:00:00 AM 0
1/27/2017 12:00:00 AM 46.950001 1/27/2017 12:00:00 AM 0
1/30/2017 12:00:00 AM 44.900002 1/30/2017 12:00:00 AM 2.05577461567276
1/31/2017 12:00:00 AM 44.25 1/31/2017 12:00:00 AM 2.3698234854946
2/1/2017 12:00:00 AM 44.049999 2/1/2017 12:00:00 AM 2.44734183692847

As you can see Close[30]=2.05577461567276 but a ShortAtClose(bar) will generate a Runtime Error Position Entry cannot be zero.
You can reproduce it for any instrument.
Can you please check this issue?

Note:
I only checked Close but I guess the issue is the same for Open
profile picture

Eugene

#5
QUOTE:
As you can see Close[30]=2.05577461567276 but a ShortAtClose(bar) will generate a Runtime Error Position Entry cannot be zero.

Haven't had an issue executing your code coupled with various BuyAt*. I believe that the bar before is looked up by WLP for purposes of position sizing (basis price).
profile picture

Cone

#6
Here's the complete script and setup...

1. Symbol: AAL
2. Daily bars from 12/14/2016 to present
3. This script

CODE:
Please log in to see this code.

It's clear from the plot that the put's price is zero on bar 29 (and prior), therefore a basis price cannot be calculated for the trade. Buy why is the price of the synthetic option zero for bars 0 to 29? I'm not sure, yet.
profile picture

Cone

#7
It seems that there are bugs in the pricing model:

1. If the price of the underlying is above the strike prior to bar 30, then the put option is priced at zero.
2. Looking at the plot using Candlesticks, it's clear that there is a serious problem with the OHLC values of synthetic put contracts (calls are okay in this sense.)

We'll mark this as a bug. Thanks for pointing out the problem, and our apologies for the inconvenience this has caused.
profile picture

DamV

#8
Thank you for your investigation.

For me, there are two differents bugs:
1- The incorrect pricing model for the price from 0 to bar-1 for Put and Call. It's the "future" value at expiration so 0 or abs(price-strike).
It's less "visible" when it's not 0 but it's also incorrect.
2- When the Close at bar-1 is zero (bug 1), ShortAtClose(bar) uses Close=0. If the Close at bar-1 is not zero it seems correct it will use Close of bar.

What is the process to have a patch? Is it every month,year - or not fixed date...
Waiting for a patch do you have a workaround? (for point 2 - maybe to ShortAtLimit using Close of bar)