Options App

Marcas

Active member
Some time ago, on TG1, I showed a program that I've used to learn about options. Lately I reopened this code. It was meant to be an exercise in coding and a way to take my mind off other project that I was working for a long time, but it turned out into a decent project in itself.

I put current state of the project on-line for others to look at and to play with it.
Project is called "Options Playground" and sits on Heroku, which offers free web-hosting.

Because it is free, there are some limitations. One of them is that, when unused, website goes dormant and it may take up to a minute for the app to wake the up. After that it works ok.
I guess there is small learning curve but nothing complicated. There are still some loose ends in the app but core functionality is there. I hope some may find it helpful.

I'd appreciate any comments.

 
Last edited:

Marcas

Active member
Upps, and here we go...
Spelling error in the title. I leave it as is for now but it is called "Options Playground" not "Optios" :)
 

tom

Well-known member
Administrator
Hi Marcas. Let me know if you want some help with hosting it. I have a few servers I can put it on.
 

Marcas

Active member
Hi Tom, thanks for the offer.
I surely can use help because I don't have experience in web applications. The one I posted is very basic and Heroku did much for me re setting web environment.

If there is interest we can place this app on your server for better user experience. If there is no interest... I'm still interested in help but... :)
Be aware that this is python based app.
 

Marcas

Active member
Well...
There are three approaches I can take to answer your question. I can talk code, mechanics and application.

This is not a place to talk about code, imo.
Application... this is large topic. All depends on person's knowledge and needs. I can imagine that for some it may be pretty useless app, I also can imagine that it may cause a trader to change his whole trading philosophy. I'd rather leave this for now.

So, mechanics it is.
Before that briefly about ideas behind OPG (Options Playground).
I make it because my trading approach changed and trying to use TOS became more and more tedious, meaning a lot of action was required to get desired info. Yes, you can get the same (within a reason) output OPG offers from TOS but you need to know what you are looking for and have a lot of patience. I wanted something to get me data quick. reducing number of clicks was one of my goals when designing.

Basic idea is this.
First volatility skew is created. From this prices and graphs are calculated. You control the skew and observe changes to the structure and t-lines.
Default skew is a la SPX but you can change it to match futures' skew or any particular instrument.


OK. now mechanics.
You basically work on two screens: Settings and Graph.

Settings.
You decide what underlying you want to deal with re atm price, stike span between near options, etc.
You also set some graph parameters like default width of a graph, meaning how many points from atm you want to be calculated. This is for practical reason - it was easier setting this than coding graph to keep zoom factor between refreshes.
In Settings you also design trades you want to examine.

After you are done you close Setting window. You always can return here to do changes.

Graphs.
Graph itself is interactive but you have to figure out how to operate it.
On the right hand column:
1) controls to manipulate the skew. Separate set for each skew. Red tick above graph - you can turn the red skew off.
On the structure graph: green is related to green skew. Trade 'entry' is based on this. Red t-line shows how t-line will change if skew shape transform from green to red.
I skipped plotting red expiration graph. I don't think it is necessary.

2) Those are simple displays for each skew. price greeks etc.

3) options structure controls. What you entered in Settings win re trade is initial, here you can dynamically change dte of the trade (green) or dte for the red skew graph, if you want to see how it will look after shape and dte change. You can also move your structure up and down x axis (up or down from atm).

Ufff :)

If you have specific questions go ahead.
 

Attachments

  • OPG_main.png
    OPG_main.png
    136.3 KB · Views: 15

tom

Well-known member
Administrator
Hi Tom, thanks for the offer.
I surely can use help because I don't have experience in web applications. The one I posted is very basic and Heroku did much for me re setting web environment.

If there is interest we can place this app on your server for better user experience. If there is no interest... I'm still interested in help but... :)
Be aware that this is python based app.

It looks like it's running on the server. ... or is it a stand alone app the user downloads and runs locally?
 

Marcas

Active member
Tb2018,
I suppose i didn't answer your question. Sorry for that. I was in the middle of other tasks when answered and wanted this out of my way. I didn't focus on the question but on the answer, if you know what I mean...

Back to your question, how _I_ use this app.
Nowadays I focus more on the code than app itself :)
I used it to imprint behavior of various structures in different environments. What I learned at the beginning of trading options was mostly half-truths and I wanted something substantial to work with. As said, TOS, my prime platform, wasn't good enough. ONE wasn't much better and was expensive.
In short, I started from playing with simple structures - this was first ver of the app, then with more complicated and then (still doing so) I use it to study complex strategies, mosttly to simplify them :).
I know that what I said may seem a bit vogue but it is hard to explain without going much into details. OPG is just one step, theoretical, in development practice I use.
 

Tb2018

Member
Marcas ,thank you for the answer ,I will have to "play" a bit with it before asking more questions......
Thanks for sharing!

Tom
 

status1

Active member
Perhaps you could explain how to use the program so anyone can play with it
It doesn't seem to be very intuitive
How do you set up that butterfly for example ?
I tried to do one but it seems to be something else in there like there is another long put somewhere so the left side of the graph is tilted up
 

Marcas

Active member
I updated Options Playground tool.

For time being link stays the same.

There are couple minor and mid-weight improvements/changes.

Some of them:
- sliders for skew-shape control work a bit different than in previous version
- examples of preset skew-shapes and options structures are now available
- in manual structure entry (on the Settings window) structure nr 2 has increased available number of legs
- relationship between OPG settings and sliders’ parameters has been improved (interactivity)

Predefined skew-shapes are available under first top button and based on historical data.
Skew-shapes fairly accurate represent state of volatility skew at selected points in time.
Two days from SPX’s past are available at this moment. If there is a need I can add samples of some stock or future’s skew. It's so many of them... Plan is to allow user to define skew presets on his own. That means user will choose instrument and data-point that fits his interest.
There is no single universal skew that fits everything.

Here is a pic showing overlaid historical skew and OPG’s skew-shape.

1621695358600.png


I think it will be helpful to understand how this works.
I took a real skew (black, Background graph on top). Marked ATM on it and shifted it to the right to match OPG’s ATM.
In example above, one day before Brexit , SPX was at 2105.63. I shifted the whole skew to the right that original ATM (2105.63) matches OPG’ ATM (3000). IMO, it's good enough.


Settings window.
It does not show up at the start anymore. Instead you see predefined structures window.
Purpose of this is to minimize number of required clicks. You still can open Setting window and use manual structure entry as before.
I also changed term ‘trade’ to ‘structure’. This is very intentional. Names are important. In short, structure became a trade when it has a trader managing it attached.

I also increased number of legs available for constructing a structure in manual entry. I just need it for the way I use OPG. This number can be changed easily, if somebody need more legs, let me know.

There are other changes, like moving indicators of structures being entered (small checkboxes) from manual entry to location above the graph. I think I will eliminate them after all – they don’t have real purpose anymore (they did in the past).

One more think. I use Firefox as my prime web browser and worked with it when coding. Lately I fired chromium and noticed that radio-buttons and check-boxes are blue there. Saying truth it looks… Here is a pic how it looks on FFox. Can you post similar pics from your browsers? Hopefully with some comments attached. If other browsers use some other default colors I may to overwrite browsers' defaults for better look. This is a matter of opinion though and I’d like to hear from you.

1621696048900.png
 
Last edited:

Marcas

Active member
While working on the OPG code I realized something. My focus stayed almost solely on mechanics of the GUI. The goal is to make is as easy as possible to navigate through the tool, to allow user to focus on analysis, not on figuring out what needs to be clicked to get an answer to the question on hand. I assumed similar approach from users


I think I’m wrong on that.

True, that designing GUI is challenging if one doesn’t simply want to follow existing solutions. My work was mostly on that part. I use OPG tool for couple of years and shaped it to my needs, so philosophy behind and goals of the tool are obvious to me. Not so with new users. I suppose they don’t care so much about GUI but about what OPG can offer to them.

Initial reason I coded this was my dissatisfaction with backtesting. I made automated backtester that was fast and robust and gave me info I wanted, but when I thought about quality of that info I paused. And I don’t mean quality of data used.

So I keep modifying BT to the point it become obvious that I need something else.

OptionsPlayground (that name is new :) ) is an alternative way to design strategies and approach trading adventure in total. If OPG's approach is better than backtesting, is a matter of opinion and is tightly linked to goals of each particular trader. In my opinion OPG’s take is more optimal. I assume (based on my small experience, and I don’t mean to make any absolute statement here) it trains your brain to think like market maker. Maybe not in full extent but in a good portion of it. Again this is my opinion and I’d like to hear what pro trades think of it, although I don’t expect they find much new in OPG.

Considering of all of this it may be indeed a good idea to show how I use the tool. Let me know if there is any interest in that.
 
Top
Contact Us