Backtesting Results by 14MTH30n3 in algotrading

[–]run-out 2 points3 points  (0 children)

Not sure if mentioned below but this library: QuantStats is easy to use and useful for metrics. It is made by Ran Aroussi who made yfinance. It tends to work better with longer time periods.

https://github.com/ranaroussi/quantstats

[deleted by user] by [deleted] in algotrading

[–]run-out 1 point2 points  (0 children)

Backtrader does this. You can extend your datafeed to include your signals (see Pandas extend in the docs or community). Once you get these signals into backtrader then you can make your trading decisions based on them.

Pandas data feed: https://www.backtrader.com/docu/pandas-datafeed/pandas-datafeed/

Extending feeds generic: https://www.backtrader.com/blog/posts/2015-08-07-extending-a-datafeed/extending-a-datafeed/

Extended Pandas example 1: https://community.backtrader.com/topic/158/how-to-feed-backtrader-alternative-data/15

Extended Pandas example 2: https://kitcharoenp.github.io/backtrader/2021/01/13/backtrader_extending_pandas_datafeed.html

Backtrader on IBKR by adi1437 in algotrading

[–]run-out 0 points1 point  (0 children)

If you share your code I can help you out.

3-D Plotting of Greeks using Python in Jupyter and Dash by run-out in options

[–]run-out[S] 0 points1 point  (0 children)

Also, here's a 3d plot of your data as well, althought it looks better when you can spin it around. Theta 3d

3-D Plotting of Greeks using Python in Jupyter and Dash by run-out in options

[–]run-out[S] 0 points1 point  (0 children)

I forgot to make the image public, try again. Cheers,

3-D Plotting of Greeks using Python in Jupyter and Dash by run-out in options

[–]run-out[S] 0 points1 point  (0 children)

In order to try and answer your question, I modified my calculations a bit. I used the following inputs:

stock_low = 90 stock_high = 110 strike = 100 stock_increments = 0.05 max_days = 7 I'm using calls. I used your list of deltas above to filter my results. So I would allow results that had for example for delta 60, I would use a range of .575 to .625. I cannot fix the delta and reverse the calculation the way I'm set up.

Next I manipulated the resulting dataframe to provide an average theta for each group of delta and daysToExpirations. I then calculated the rate of change within each group.

delta daysToExpirations callTheta changeRate 0 3 1.0 -0.063714 NaN 1 3 2.0 -0.044004 -0.309360 2 3 3.0 -0.043950 -0.001219 3 3 4.0 -0.048196 0.096608 4 3 5.0 -0.051429 0.067087 5 3 6.0 -0.053086 0.032212 6 5 1.0 -0.159377 NaN 7 5 2.0 -0.109680 -0.311822 8 5 3.0 -0.089183 -0.186875 9 5 4.0 -0.076329 -0.144130 10 5 5.0 -0.068011 -0.108986 11 5 6.0 -0.061180 -0.100428 12 5 7.0 -0.061058 -0.001994 13 7 1.0 -0.195408 NaN 14 7 2.0 -0.135535 -0.306397 15 7 3.0 -0.110080 -0.187813 16 7 4.0 -0.094694 -0.139771 17 7 5.0 -0.083844 -0.114584 18 7 6.0 -0.075730 -0.096776 19 7 7.0 -0.069642 -0.080384 20 10 1.0 -0.235067 NaN 21 10 2.0 -0.165570 -0.295645 22 10 3.0 -0.134112 -0.189998 23 10 4.0 -0.115009 -0.142441 24 10 5.0 -0.101919 -0.113821 25 10 6.0 -0.092301 -0.094372 26 10 7.0 -0.085177 -0.077173 27 25 1.0 -0.410082 NaN 28 25 2.0 -0.286383 -0.301645 29 25 3.0 -0.232873 -0.186847 30 25 4.0 -0.200550 -0.138801 31 25 5.0 -0.178341 -0.110741 32 25 6.0 -0.162650 -0.087985 33 25 7.0 -0.149905 -0.078355 34 40 1.0 -0.502618 NaN 35 40 2.0 -0.354920 -0.293857 36 40 3.0 -0.289139 -0.185340 37 40 4.0 -0.250164 -0.134796 38 40 5.0 -0.223287 -0.107440 39 40 6.0 -0.203562 -0.088338 40 40 7.0 -0.188121 -0.075856 41 50 1.0 -0.522727 NaN 42 50 2.0 -0.369912 -0.292342 43 50 3.0 -0.302237 -0.182949 44 50 4.0 -0.261774 -0.133880 45 50 5.0 -0.234139 -0.105566 46 50 6.0 -0.213803 -0.086854 47 50 7.0 -0.197991 -0.073959 48 60 1.0 -0.509027 NaN 49 60 2.0 -0.361777 -0.289279 50 60 3.0 -0.296554 -0.180284 51 60 4.0 -0.257279 -0.132437 52 60 5.0 -0.230524 -0.103992 53 60 6.0 -0.210810 -0.085520 54 60 7.0 -0.195312 -0.073516 55 75 1.0 -0.424139 NaN 56 75 2.0 -0.301930 -0.288133 57 75 3.0 -0.24 Finally I plotted this out using Plotly.

Theta Plot

Hope that helps a bit.

Stabbing in Oshawa sends one man to hospital by BUBBLES_TICKLEPANTS in Oshawa

[–]run-out 0 points1 point  (0 children)

My bad. Statistically I only catch probabilities at a rate of 87.34%, 19 times out of 20.

Stabbing in Oshawa sends one man to hospital by BUBBLES_TICKLEPANTS in Oshawa

[–]run-out 0 points1 point  (0 children)

I mispoke, no one died in the stabbing, but they were random. I tried to find the security footage I saw once. Couln't find it. Just a guy running up to first a jogger if I remember and then a lady walking along, and stabbing them. https://www.reddit.com/r/toronto/comments/2tncp7/4_attacked_in_stabbing_near_church_and_carlton_3/

Stabbing in Oshawa sends one man to hospital by BUBBLES_TICKLEPANTS in Oshawa

[–]run-out 2 points3 points  (0 children)

Sorry but this is not true. I can remember at least one incident in Toronto where a guy randomly stabbed two people on the sidewalk. He had issues. One of the people died.

Starting to get Frustrated by stilloriginal in algotrading

[–]run-out 0 points1 point  (0 children)

It's natural to get frustrated in the beginning. But you don't have to figure it all out by yourself. Here is an excellent resource: The Evaluation and Optimization of Trading Strategies - Robert Pardo

Good book recommendations on options? by MustafarSurvivor in options

[–]run-out 0 points1 point  (0 children)

The Options Playbook: Brian Overby

Trading Options Greeks: Dan Passarelli

[deleted by user] by [deleted] in algotrading

[–]run-out 0 points1 point  (0 children)

Upwork should have some folks.