A place for redditors to discuss quantitative trading, statistical methods, econometrics, programming, implementation, automated strategies, and bounce ideas off each other for constructive criticism. Feel free to submit papers/links of things you find interesting.
Welcome to FXGears.com's Reddit Forex Trading Community! Here you can converse about trading ideas, strategies, trading psychology, and nearly everything in between! ---- We also have one of the largest forex chatrooms online! ---- /Forex is the official subreddit of FXGears.com, a trading forum run by professional traders. FXGears.com hosts and moderates our chatroom, and has developed such tools as the chart bot you'll find available in chat.
I want to celebrate with you the end of my backtest journey! This is what 388 k candles looks like. 710 trades. 45% winrate. 1:2 rrr. -11.5% drawdown. +486% gain. No hate!
review charts and tables highlighting various performance metrics such as max drawdown, total P/L, Sharpe ratio, total return, etc.
take an "under the hood" dive that looks into the strategies that experienced the greatest (5D hold-till-expiration) and least (50D early mgmt) total return
learn how the wheel strat is materially influenced by timing luck
Takeaways / TLDR:
All strategies except 30D early mgmt and 50D early mgmt were profitable
30D hold-till-expiration had the greatest risk-adjusted return among the wheel strats
No wheel strat outperformed buy/hold SPY with regard to total return
No wheel strat outperformed buy/hold SPY with regard to risk-adjusted return
One of the strategies - 50D early mgmt - went negative despite wheeling being "safe"
“The desire for constant action irrespective of underlying conditions is responsible for many losses on Wall Street even among the professionals, who feel that they must take home some money every day, as though they were working for regular wages.” -Jesse Livermore Real simple: What we as options traders have to our advantage is timing of participation and management. In other words, we can pick our spots in regards to IVR and market extremes. Furthermore, we practice closing out our trades early and managing aggressively. Finally, we mitigate risks, such as gamma, by reducing overall portfolio volatility. When I can get the SAME RETURNS AS HOLDING $SPY by ONLY ALLOCATING 20% of my account ON SHORT PUTS, and MITIGATE the over portfolio volatility (deviation) by 30% that’s the power of selling short puts, wheel, covered strangles. We also can diversify by mixing up products, positions, duration and correlation. These backtests by zwig or whatever are trash. They assume you constantly deploy capital regardless of market conditions and that you’re taking everything to expiration. Tastytrade has 1000 more backtests that give you better context and tradable mechanics. Here’s one tastytrade video to get you thinking right: https://ontt.tv/2m3hTzq
review charts and tables highlighting various performance metrics such as max drawdown, total P/L, Sharpe ratio, total return, etc.
take an "under the hood" dive that looks into the strategies that experienced the greatest (5D hold-till-expiration) and least (50D early mgmt) total return
learn how the wheel strat is materially influenced by timing luck
Takeaways / TLDR:
All strategies except 30D early mgmt and 50D early mgmt were profitable
30D hold-till-expiration had the greatest risk-adjusted return among the wheel strats
No wheel strat outperformed buy/hold SPY with regard to total return
No wheel strat outperformed buy/hold SPY with regard to risk-adjusted return
One of the strategies - 50D early mgmt - went negative despite wheeling being "safe"
https://ibb.co/r4nBRGz This is options strategy on $SPY. What do you think about the small total drawdown compared to the underlying, but the big stdev of returns for the strategy becase of the leverage, as a tradeoff (low geo sharpe) ?
Easiest way to backtest a strategy for someone who doesn't code
Hello everyone, I have been live trading a relatively simple strategy for more than a year now with good success. I would like to backtest it extensively (with a long history) and eventually tweak it with some upgrades I have in mind. And finally maybe automate everything. However, I don't know how to code. I tried once but got distracted by other work stuff. I'm pretty sure I can learn basic things but would prefer not to get heavily into this (I prefer to focus on the trading aspect). This strategy works on daily timeframe and needs access to the price of futures (at the end of day) of several markets. What would be the easiest solution for me to backtest my strategy? From what I've read previously, Tradingview seems the easiest solution but people seems to think the backtest is not realiable. An other option seems to be Quantconnect?
Am I missing something? How come no one is talking about parameter optimization or model calibration in algotrading and backtesting?
Okay, maybe saying "no one" is a little extreme, but it seems rarely talked about. I am referring to when you apply or backtest a trading algorithm with configurable parameters, instead of hand-picking the parameter values, the more formal process is to automate the parameter optimization (i.e., finding the parameter value set(s) that most minimized the loss function). Assume you are applying it the right way, such as backtesting with forward testing or hold-out set to avoid overfitting. Am I missing something here?
I am looking for resources to backtest Option Strategies🤖👨💻
It's been kinda hard for me to find good info regarding historical prices of options but yeah. If anyones has suggestions on were to go or some tips while testing it will be great! Thanks for any help
Looking at the Wheel backtest that was posted recently, at first glance it seems that wheeling on SPY underperforms the market. I was looking at the following benchmark indexes from CBOE: 1) Cboe S&P 500 30-Delta BuyWrite Index (BXMD) - This tracks selling monthly covered calls at 30 Delta 2) Cboe S&P 500 PutWrite Index (PUT) - This tracks selling ATM puts According to CBOE, both these indexes have outperformed the market over a 32 year period. They claim that these indexes have had higher total return, higher risk-adjusted return and lower volatility that the S&P 500. There is no index tracking 30 Delta PutWrite, if there were I assume that would have even better returns that PUT. As the wheel is a combination of these strategies, I am assuming the returns from the wheel should be even better. I am sitting here scratching my head on why the backtests seem to show the wheel to underperform whereas the indexes from CBOE paint quite a rosy picture. One major aspect I see with u/spintwig's research is that they have factored in commissions and slippage, but not sure if that would really cause such a huge discrepancy with the CBOE indexes. CBOE Resources: 32 Years of Performance History Wilshire Options-Based Benchmark Indexes 2019 EDIT: This chart shows how BXMD (writing 30 Delta covered calls) has consistently outperformed the market from 1986, even during the raging bull market post 2010. http://www.cboe.com/lib-images/default-source/default-cboe-library/s-04-03-bxmd-line-graph.png?sfvrsn=b9a65f48_0https://i.imgur.com/c7szoDj.jpg
"80% of options expire worthless, therefore selling options is the smarter play!" examined on a 2 year backtest of writing puts against the SPX
I see the line from the title repeated over and over in thetagang. Most readers here know that selling options is not quite as simple as the title, but a recent study published by the most excellent spintwig really drives home why that is the case, and I wanted to highlight it. The study contains tests of four different expiration strategies, but this post will pick on the 45DTE (Days Till Expiration), as that interval is the most popular thanks to TastyTrade. A highly oversimplified explanation of Spintwig's test is that he backtested selling a put option against the SPX every day for two years. You should absolutely read the entire thing to get all the details (will link in comments as automod typically removes posts with links in them as spam), but here are the parts to this discussion: 5D options are very far out of the money, so we'd expect small premiums, but a very high win rate. And sure enough, when selling 5D (5 delta) options with 45DTE, the win rate was a whopping 95%. Pretty good right?? I mean, with win rates like that, how can you lose?? Turns out you can lose pretty badly. The Covid dip caused losses that completely destroyed the profitability of the entire strategy, even after the market came back. The 5% of the trades that were losers for the strategy not only wiped out every cent of gains from the 95% of the winners, but ended with the strategy down 12% overall, even after the market recovered. I will quote another very well informed contributor to these subs, u/imnotarobotyouare: "This is a successful options seller:" +1 +1 +1 +1 +1 +1 +1 +1 -7 "This is a losing options seller:" +1 +1 +1 +1 +1 +1 +1 +1 -9 The moral of the story is: Do not conflate win rate with edge. As Spintwig demonstrates, you can play it safe by selling far Out-of-the-money options, win 95% of the time, and still lose a lot of money when the fat tail hits. Thanks to Spintwig again for his excellent work and generosity in making it available for free.
“80% of all options expire worthless, therefore selling options is the smarter play!” examined on a 2 year backtest of writing puts against the SPX
I see the line from the title repeated over and over in thetagang. Most readers here know that selling options is not quite as simple as the title, but a recent study published by the most excellent spintwig really drives home why that is the case, and I wanted to highlight it. The study contains tests of four different expiration strategies, but this post will pick on the 45DTE (Days Till Expiration), as that interval is the most popular thanks to TastyTrade. A highly oversimplified explanation of Spintwig's test is that he backtested selling a put option against the SPX every day for two years. You should absolutely read the entire thing to get all the details (will link in comments as automod typically removes posts with links in them as spam), but here are the parts to this discussion: 5D options are very far out of the money, so we'd expect small premiums, but a very high win rate. And sure enough, when selling 5D (5 delta) options with 45DTE, the win rate was a whopping 95%. Pretty good right?? I mean, with win rates like that, how can you lose?? Turns out you can lose pretty badly. The Covid dip caused losses that completely destroyed the profitability of the entire strategy, even after the market came back. The 5% of the trades that were losers for the strategy not only wiped out every cent of gains from the 95% of the winners, but ended with the strategy down 12% overall, even after the market recovered. I will quote another very well informed contributor to these subs, u/imnotarobotyouare: "This is a successful options seller:" +1 +1 +1 +1 +1 +1 +1 +1 -7 "This is a losing options seller:" +1 +1 +1 +1 +1 +1 +1 +1 -9 The moral of the story is: Do not conflate win rate with edge. As Spintwig demonstrates, you can play it safe by selling far Out-of-the-money options, win 95% of the time, and still lose a lot of money when the fat tail hits. Thanks to Spintwig again for his excellent work and generosity in making it available for free. EDIT: Some people seem to think this post is an endorsement of a completely mechanical “sell a SPX put each day” strategy. It’s not. It’s a demonstration of how even a very high win rate can still be swallowed by tail risk. That’s it.
Pessoal existe alguma ferramenta de backtest para portfolios de ações da B3?
Olá, recentemente achei esse site: https://www.portfoliovisualizer.com/ Ele permite que vc monte sua própria carteira de ações, selecione uma forma de aporte mensal ou único e faça um Backtest do quanto essa carteira teria rendido ao longo dos anos. Existe algum site ou software que permita fazer o mesmo para ações da B3?
I want to efficiently test many parameters combinations for my strategy. I am considering AWS Batch, GCloud scheduler + PubSub + Cloud Function, or perhaps a custom solution. Obviously some managed platform that automates the underlying instance provisioning would be great. Also these jobs will share the same input dataset, so shared memory access across subsets of jobs might save me data transfer costs. Anybody have experience with this and/or suggestions? Thanks
FOREX, DAILY Backtesting my system last 7 years, 2000 trades. Data was split 75:25 in sample and out of sample, both profitable. However, when forward testing the algo entered drawdown and is still on its way down. What could be the reasons why?
Let's say we are using a neural network and need to train the network with back propagation and differentiable loss function. Instead trying to compare predictions to a target, we can precompute all predictions, backrest the results and provide a "loss" value to this particular set of weights and biases. Is there anyway to make this process differentialable so we can use something sgd to optimize the network without a target?
I am a Software Engineer / Data Scientist and I decided to give a go at automating a strategy based on the ParallaxFX strategy floating around and backtests the results, also due to some inspiration by Vanguer
I backtested on the majors 4H timeframe between January 2015 to January 2020.
I am only considering trades from the top and bottom bands for now.
If a candle meets my trade criteria I open the trade and forget about it.
I started with a balance of 500 EUR and a risk of 1%. The results use compound gain / loss and I only considered one currency pair at a time.
The results were not that impressive... EUUSD
Trades: 29
Wins: 10
Losses: 19
Balance: 567.45
AUD/USD
Trades: 29
Wins: 7
Losses: 22
Balance: 500.92
GBP/USD
Trades: 25
Wins: 5
Losses: 20
Balance: 479.55
NZD/USD
Trades: 26
Wins: 6
Losses: 20
Balance: 495.07
USD/CAD
Trades: 22
Wins: 4
Losses: 18
Balance: 473.90
USD/CHF
Trades: 28
Wins: 7
Losses: 21
Balance: 505.98
Due to this being automated I can test a variety of parameters pretty quickly and come back with trading screenshots, results, etc.
I am considering a higher timeframe but the number of trades is already fairly low.
Here is a link to a Google Drive (https://drive.google.com/drive/folders/16cO0ZSCGakkbK90lh-FBIC3ZJIxOj9fI?usp=sharing) with screenshots from each trade and a log of the system as it makes the trades. The candles highlighted in yellow / purple are where the trade is entered. I do not have the picture marked as a win / lose but it should be obvious by the candle formation.
Has anyone backtested the most optimal DTE for CSP while wheeling? I have seen many people use around 30-45DTE, but recently have seen more and more using weekly puts instead. I am wondering if anyone has either seen or conducted a backtest on the best DTE range on a risk/reward basis. I can see that generally premiums collected are higher with more DTE but those options have less maneuverability than shorter DTE so I am wondering what everyones thoughts are? Basically I'm wondering if shorter DTE could allow for a higher hit rate that could make up for slightly less premium collected?
Alpha Phi Omega Backtest and Lost and Found services are up and running! Go to https://tinyurl.com/APOappts to request material and read more on how we're operating this semester. Good luck and stay safe!
This is a momentum portfolio allocation strategy based on Muscular Portfolios or The Ivy Portfolio and is fairly straight-forward to carry out going forwards. However, back-testing requires skills/know-how that I lack so I'd love to pay someone with the will and skill to do it for me.
Take the top 100 crypto assets.
Work out the growth of each crypto asset for 3 months, 6 months and 12 months trading against bitcoin.
Calculate the average of those 3 numbers.
Allocate 20% of a 1 BTC starting budget to the top 5 highest average growth crypto assets.
Re-allocate once per month to the new top 5 highest average growth.
I'd ideally like this back-tested 24 months, (so starting at the latest October, 2018). I will need the spreadsheet showing each monthly allocation and portfolio (BTC) growth in a spreadsheet. Happy to negotiate payment based on hours of work required and happy to pay crypto via escrow or on delivered work (or fiat if preferred). Please PM.
Backtest results for selling CSP (Cash Secured Puts) from 2007 onward: 17 underlyings with over 300 variations
Selling CSP (Cash secured puts) seems to be the default for many of us around here. Not only is this strategy popular on its own, but it's the cornerstone of the holy "wheel" strategy as well. This site performs backtests specifically on CSP strategies. They generally run it since 2007 and present a bevy of excellent data and analysis on each. https://spintwig.com/options-scorecard/ Running my own quick figures on their scorecard, Buy-and-hold produced superior net returns to CSPs 77% of the time, although CSPs provided superior risk-adjusted returns 58% of the time. These studies are VERY well done, and I'm surprised I don't see them mentioned more frequently around here. Edit: props to spintwig as this is his site.
Any tools to backtest Price Action on Support Resistance and trend line manually?
I want to back test my Price action strategy at key support and resistance and trend line over past data manually is there any free tool or program available to do so?
vector supplement. solutions:back exams. syllabus. fall '19 ta office hours. lecture notes When we study backtest there are so many things we encounter while analysing results that open new ways of thinking, and once we enhance our thought process there are hundered routes to follow. Start with the study. Our Features. Create Your Strategy. You can create your strategy using below options... A backtest should consider all trading costs, however insignificant, as these can add up over the course of the backtesting period and drastically affect the appearance of a strategy’s ... Run a backtest for all possible start months at once, and give composite statistics. This removes seasonality effects from longer-hold screens and can give a more accurate picture of their expected return. Options Simulator Use the Black-Scholes model to simulate option strategies using the backtested screens for underlying stocks. Backtest Portfolio Asset Allocation. This portfolio backtesting tool allows you to construct one or more portfolios based on the selected mutual funds, ETFs, and stocks. You can analyze and backtest portfolio returns, risk characteristics, style exposures, and drawdowns.
How to Create an Algorithm to Backtest Trading Strategies ...
Website: https://equitieslab.com Facebook: https://www.facebook.com/Equities-Lab-214830098679722/ What is backtesting? A backtest is simply the easiest way t... This video will show you How to Backtest a Forex Trading Strategy, as well as 3 TIPS on BACKTESTING... MENTIONED IN THE VIDEO 👇🏼 Trading Platform: https://tr... NinjaTrader is an excellent platform for performing historical backtests. There are at least two ways to run the backtest: on the chart or in the strategy an... - Backtest strategy using historical data from local csv file - How to live trade a strategy - Place orders to multiple accounts - Analyze trading results from a strategy An indicator for NinjaTrader that will assist you in manually backtesting your trading methodologies. http://www.freeindicators.com http://www.freeindicators...