Struggle with different days in the week and time to expiry

Dennisss11

New Member
Joined
Nov 25, 2022
Messages
9
Office Version
  1. 365
Platform
  1. MacOS
Hi everyone!

Im starting to go crazy. I'm feeling quite handy with excel and its lovely IF formulas, but I bumped into a problem I can't seem to solve!

I am building a backtesting model for our option trading strategy, where we have a couple of constants:
- Friday at the end of the day we open a position, which is always "Day 0". This position always has an expiry date the next Friday.
- The next Friday is always the closing day. This closing day does not require a specific input, but the days in between do!
- On the opening of a position we pick a specific Strike Price. This Strike Price should always stay the same right until the next Friday.

Problem 1 (days to expiration)
- For option trading the days to expiration is important. So lets say I open a position on Friday (Day 0) and we have a regular week with Monday till Friday, my output should look like my first screenshot.
- Now with regular weeks this is not a problem. But we also have weeks in which the Friday is a free day (Christmas for example). In that case the days to expiration on the first Friday is 14 days away. Then, everything changes since for example the next Monday should have 11 days till expiration, the Tuesday 10 days, etc. My second screenshot shows a week like this.

Problem 2 (Strike Price should remain the same Friday to Friday)
- When the strike price is for example 1000 on Friday, it should stay 1000 right up until the next Friday.

If anyone could help me, that would be highly appreciated!!

Kind regards,

Dennis
 

Attachments

  • Screenshot 2022-11-25 at 15.29.17.png
    Screenshot 2022-11-25 at 15.29.17.png
    8.7 KB · Views: 8
  • Screenshot 2022-11-25 at 15.37.21.png
    Screenshot 2022-11-25 at 15.37.21.png
    11.2 KB · Views: 7

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top