1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trading Group 2 - March 14, 2017

Discussion in 'Round Table Presentations' started by status1, Mar 18, 2017.

  1. status1

    status1 Well-Known Member

    Paul Demers had a very nice presentation of his real time excel butterfly analyzer risk graph
    I was wondering how difficult it would be for someone to build something similar ?
    Also how much hard drive space does all that data collected take up ?
    This a,most good enough if not even better than ONE or OV
    I wonder if that would be for sale how much it would cost ?
  2. Marcas

    Marcas Well-Known Member

    status1, I think it will be pretty expensive as you have to by also Paul's time to set it up and customize for you.
    To build it up is not _that_ hard*) just you need to know exactly what you want. Requires time...

    As per being better than ONE/OV I'd say it depends.ONE/OV are good way to get feeling of new trade not so good for extensive back-testing. I cant force myself to sit in front of monitor and click for few hours straight, that's why I'm working on my system. As I said, it is not too hard*) just requires time. Especially when you build it for yourself you don't have to worry about whole GUI.

    Try to get some data and start playing with Excel and VBA (youtube is your friend) - if you have time and if you want to go this way : )

    *) I'm taking about simple data manipulation. If you want go into building/improving models it is different story and I'm not the one to talk to.
  3. Teddy

    Teddy Well-Known Member

    It does take a lot of work. I'd imagine it was a struggle learning SQL. I have MS SQL installed on my computer. I have not used it for a few years, so I'm kind of rusty at writing the code. Not easy and I would start with something small first.

    For now, I back test hard on ONE.

    One thing I found useful was trying to read the price action to see when to get in and out of trades. If the price action is wrong, it doesn't really matter what setup you are in with your option strategy. I had one trade that took a few months to make small profit. But reflecting upon the price action,l it would have better to just sit it out and wait for the setup.
  4. Steve S

    Steve S Well-Known Member

    Easy if it's a hobby you find fun and rewarding ... otherwise you will probably curse yourself for even beginning.

    A max number would be LiveVol 1-minute data from 2004 - present ... that's 1-2 terabytes depending on how you save it and store it. Any other underlying (RUT, etc.) would only be a fraction. If you only want 5-minute resolution or less then storage would not be an issue on any modern hard drive.

    Doing a risk graph to replace OVue/ONE/TOS is probably the easiest thing out of all the basic stuff you would want once you had a handle on the data ... but keep in mind that most of us will want the skew-adjusted greeks, which opens up an area of moderate difficulty beyond just banging away with Black-Scholes. I believe I've heard Paul say that he doesn't care about the skew-adjusted greeks (Riggio also), which is 100% fine for an experienced trader who knows exactly what he or she is doing ... personally, I depend on skew-adjusted because I know mine are significantly more accurate while doing no harm.

    With no support ... you could probably get someone to give it away for free. With full support ... I'll set you up with my entire system $1/year for the software license & all source code, plus $500,000/year for support, 1-year minimum paid in advance.
    garyw likes this.
  5. status1

    status1 Well-Known Member

    Thanks for all the replies
    This would be a hobby for me but also a challenge to see if I can do it
    5 minute or less would be fine for me as a start as I definitely don't have anywhere near one terabyte
    I would probably only use it on SPX and /or RUT
    Is there anyone out there who is offering this for free with no support ?
    I just want to have an idea of how it's done just to get the basic principles and formulas and see if I really want to dive into this

    A couple years ago I was messing with the Black Scholes formula to calculate the greeks (actually just the delta) but for some reason I could never get the results to match what is shown in TOS I am not sure if I was missing something from the formula or it does not work in reality
    I was just using some examples I found on the internet and I would get the results shown on the internet for that example but if I then substitute the underlying with an SPX strike price and a real expiration the numbers would be way off
    so I pretty much gave up after that
  6. Marcas

    Marcas Well-Known Member

    Just start small.
    I would argue that you don't have to be anywhere close to 1 min data. EOD should be enough - depends on what you trade.
    Good luck!
  7. Srini

    Srini Active Member

    Were you calculating Greeks on stocks or indicies? Early exercise feature of american style options can throw off calcualtions. TOS uses Bjerksund-Stensland model for American style options.
    If it is difficult to build some type of VBA macro, then i would suggest http://www.hoadley.net/options/options.htm. It has lot of built in feature to build your own spread sheet. It can do lot more than just options. Especially it is powerful for portfolio finance.
  8. status1

    status1 Well-Known Member

    I was planing to start with the SPX so that would be the European model but looking in TOS I don't see any difference between the Bjerksund-Stensland model and the Black Scholes model as far as the greeks and the p/l is concerned

    One of the variable I am not sure about is the Risk free rate value
    A lot of examples are using 4% and I saw one was using 8% so I know that is wrong but what is the right value or where do I get that from ? Do I use the current interest rate 0.75% , the 30 year bond rate, something else ?

    The other variable is the volatility
    A lot of examples are using 30% While I know that number is high I am not sure what is the right number and where to get it from

    I looked at Hoadly a while back but for some reason I did not like it and it does not show the formula so I can't learn too much from it
  9. garyw

    garyw Well-Known Member

    You should attempt to quantify the level of accuracy/precision you require/desire. If you don't care about accuracy, you may be able to get by with picking some constant for interest rates. However, if you desire accuracy, you need to consider and deal with the details. There are a number of moving parts if you want accuracy. Steve S has produced papers on this which are a good place to start. -- For interest rates from a couple weeks to about 6 months DTE, the like duration LIBOR rates from the FED are a reasonable approximation if you don't mind a tiny bit of error. -- Like most things this is a Garbage In Garbage Out if you supply Garbage as the input!
  10. Steve S

    Steve S Well-Known Member

    They won't use Bj-St for European options ... also, anyone using Bj-St for American options be careful; there are three versions and only the third is reasonably accurate ... most platforms will probably use the first because it is the only fast one, but it sucks pretty bad for accuracy. Always compare to a well-programmed binomial model so you know the expected errors.

    Ok you are really starting at the beginning here. If you're not completely clear on rates, yields/PVDivs and vol as Black-Scholes parameters then you need to stop, get yourself a good Black-Scholes calculator with implied vol calculator, and get comfortable with the model. In regards to data, you should probably forget about historical data for now and just start with collecting and processing some TOS chains (after you get comfortable with your Black-Scholes calculator). You can get tons of help from lots of folks here - start some private conversations. I can help with most topics if you want incredibly lengthy, boring, detailed and analytically correct assistance.
  11. Srini

    Srini Active Member

    I agree with Steve and garyw. You need to be sure about the input, before you proceed. For interest rates, I would use implied finance rate from here or you could use Libor also as quick approximation

    If you are using Black scholes, Hoadley function input's are same as any B/S calculator. He has verified his other functions with several papers.
  12. status1

    status1 Well-Known Member

    Yes I understand I am at the beginning that's why I have a few questions
    At this point I am just looking for a model (any model) that I can use to get somewhere near the ballpark of the call and put prices shown in TOS
    Having a good Black Scholes calculator would be great but I haven't found one yet that works with SPX
    Even if I find one I still would need to know what to use for the risk free rate and volatility

    Now having said that even with the known values for those I still can't get the right call and put values for SPX
    In the example I found on the internet it shows a calculation for a $62 stock with a $60 strike price and I got the same result as shown with the calculation $3.72 for the call but if I leave everything the same and just change the stock price with the SPX price 2378 and the strike price to 2370 I get about $100 for the call price while TOS is showing about $26 for 40DTE
    At that value changing the volatility from 70 to 10 makes no difference on the value of the call and changing the risk free rate from 4 to 0 only brings the value down to $94 even if I bring the DTE to 0 the value of the call is still $94

    So obviously there is something wrong there
    Either I am missing some small variable in the formula or maybe that formula does not work on high priced stocks or indexes
  13. Steve S

    Steve S Well-Known Member

    You are probably making this too complicated ... basic Black-scholes for European options is very simple, it always "works" ... exact rates are not very important for < 3 months DTE so long as you are in the ballpark (1% - 1.5% right now). Yields/PVDivs are more important, but still not a big issue so long as you are in the ballpark (SPX yield around 1.9% right now). Decently correct forwards ARE important ... if you're not on top of this then you need to be. Volatility is very important ... you need that implied vol calculator if you want to work with real data, although for a start you can use the lousy TOS, OVue or ONE vols (or the much better IB TWS vols).

    If you want to post your Black-Scholes code in a spreadsheet then I will check it for basic correctness ...
  14. status1

    status1 Well-Known Member

    I got the formula from this video

    So using the data in the video I got the correct result so the formula seems to be correct but for some reason I can't get anywhere near the values shown in TOS when I substitute for SPX
    If you can tell me if the formula is correct or not that would be a great help
  15. Steve S

    Steve S Well-Known Member

    Without looking at the video, I'm virtually certain THEIR formula is correct ... the relevant thing is whether or not YOUR version is correct ... if your code is in some "old fogey" language like C, C++, .NET, VBA or Excel worksheet formulas then great ... if it's in one of these "young people" languages like Python/R/Ruby/Perl then I'll do the best I can ...

    P.S. If you're matching their numbers then it's more likely you have some issue with interpretation of parameters ... can help with that if you give an example or two.
  16. stevegee58

    stevegee58 Well-Known Member

    One observation I made of the video is the narrator rounded d1 and d2 so he could look them up in a normal CDF table. That alone introduced a noticeable error.
    My own C functions don't have to round anything because normal CDF is calculated directly with no table.
    Here are his inputs:
    S = 62
    K = 60
    r = 0.04
    v = 0.32
    T = 40.0 / 365.0
    His calculated option prices:
    Call: 3.72
    Put: 1.46

    My results using my functions with the same inputs:
    Call: 3.85895
    Put: 1.59651
  17. status1

    status1 Well-Known Member

    Thanks STEVEGEE58
    You could be right about the D1 and D2 They are very sensitive to minor changes
    I did the calculations with and without the rounding and I got those similar results but it still does not explain (I don't think) the big difference in the SPX values although that could be where my problem is
    I have to look up the D1 and D2 values using the SPX calculations and see if that makes a difference
    I was wondering what do you get for d1 and d2 when you substitute for the current SPX value ?
  18. stevegee58

    stevegee58 Well-Known Member

    I just tested my BS pricing function with live data and it agreed with IB.

    SPX: 2344.66
    Strike: 2340
    Risk-free rate: 0.5%
    Volatility (IV for 2340 strike): 10%
    DTE: 29 days

    My calculated call price: 29.2
    IB call price (mid): 29.0
  19. Steve S

    Steve S Well-Known Member

    Possibly part of your trouble: I glanced at that video and it looked like they were not talking about the yield parameter at all ... the no-yield formula will work fine for SPX (in fact, it's "more correct" than the yield formula), but you have to input SPX - PVDiv for the price, not SPX. If you don't want to estimate the PVDivs then you need the formula with yield.
  20. status1

    status1 Well-Known Member

    Thanks Stevegee58 for the values
    I will go over the d1 and d2 calculations again and see if I missed anything

    Steve S ---- Can you tell me what does the PVDiv stand for and how is that used in the formula or is this a different formula you are referring to ?

Share This Page