started procedures.js
parent
eed3f1326b
commit
817de00cce
@ -1,3 +1,10 @@
|
||||
# calendar-optimizer
|
||||
# Calendar Optimizer
|
||||
|
||||
Options Calendar-spread optimizer, based on projected underlying price range and IV smiles at different expiries.
|
||||
|
||||
# Steps
|
||||
|
||||
1. Choose front-month expiry for which you have an opinion on underlying price range.
|
||||
2. Draw expected IV Skew for various underlying prices for various back-month expiries, at front-month expiry. For example, if price would be way lower than it is now, it's probably because some scary event happened that makes investors nervous, so IV would be relatively high (even ATM), and would be skewed towards calls, since the market is expecting a comeback by the back-month expiry. The UI would have a slider for underlying price (one slider per back-month expiry). A portion of the slider would be highlighted, to signify that the current drawing applies to that range of underlying prices at front-month expiry. There's a slidable arrow that acts as a cursor. Whatever price it falls on dictates the numbers on the axes of the drawing, so it's easy to imagine actual prices on the x-axis instead of percentages-from-the-money. There's a 'Split Range' button to split the current range on the slider into two, by adding a slidable boundary in the middle of it (at the cursor).
|
||||
3. Choose the desired strike prices at which to open calendars, using a final 'price strip/slider'.
|
||||
4. Now that the front-month expiry is chosen, and the strikes of the calendars, the application can now choose the best back-month expiries for each individual calendar. It can optimize for one of two things: cheapest combo, highest max profit
|
@ -0,0 +1,24 @@
|
||||
// EXAMPLE STATE:
|
||||
const state = {
|
||||
front_months: { // front months, i.e. calendar expiry, at which the user has an opinion on where the underlying price may be
|
||||
"2022-03-11": {
|
||||
underlying_ranges: [ // underlying-price ranges, at which the user thinks the underlying price may be, at expiry (i.e. front-month)
|
||||
{
|
||||
from: 300,
|
||||
to: 400,
|
||||
back_months: { // back months, for which the user has an opinion on what the IV-smile will look like, given that the underying price is within range
|
||||
"2022-04-17": {
|
||||
iv_fn: someFn // signature: (underlying_price, strike_price, dte); the function internally stores the shape of the IV-smile as a function of percentage-diff-between-underlying-and-strike, so that the function can be run for any underlying value in the range, and of course any strike.
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export const calculateBestCombinationOfCalendars(){
|
||||
|
||||
}
|
Loading…
Reference in New Issue