Questions tagged [backtesting]
The process of evaluating a strategy, theory, or model by applying it to historical data.
388 questions
0
votes
1
answer
201
views
How can we determine the minimum viable holding period given granular data and transaction costs?
Given assumptions around transaction costs (e.g., slippage, fees), and potentially downsampled tick or bar data, how can we derive the minimum holding period required for a strategy to be viable — ...
0
votes
0
answers
64
views
Should we add dividends as a cash to the portfolio cash when using the adjusted close price?
I am backtesting some strategy and using the adjusted close price.
I wonder if I need to take into consideration the dividends paid in cash. Should I add them into portfolio cash or not ?
As far as I ...
2
votes
0
answers
139
views
Is this a valid shortcut for backtesting free of survivorship bias?
We backtest a very complex equity strategy that uses dozens of different fundamental and macroeconomic indicators. To make this backtest free of survivorship bias, we first collected all stock tickers ...
0
votes
0
answers
60
views
Seeking Feedback on Indicators Based Trading Strategy Project: Verification and Improvements Needed
I’m developing a stock market analysis system to help traders make informed decisions using technical indicators like RSI, SMA, OBV, ADX, and Momentum. The system analyzes historical data to generate ...
0
votes
0
answers
93
views
PCA Backtesting for Hedging
I am working on a project to use PCA for hedging.
How can I backtest that the risk obtained with under a MultiVariate Normal model is working well?
(PCA for Risk bucketing)
Let's say, I have ...
0
votes
0
answers
84
views
PineScript: How to create a signal to buy or sell that uses multiple indicators like RSI, Bollinger Band, etc, at once?
So I am trying to create a signal on tradingview but the problem I am encountering is, I have a bunch of indicators, etc. that have to align and on pinescript, for those who are familiar, they have an ...
1
vote
1
answer
314
views
Simple approach to estimate survivorship bias in backtest
I am conducting a backtest on a strategy that involves buying individual US stocks and selling them after a specific period. One of the key challenges is addressing survivorship bias. Ideally, the ...
0
votes
1
answer
433
views
Strategy works on backtest, but doesnt seems to work in the real world
I have a strategy that works in the backtests.. but it seems to me that it is not working in the real world.. Here is how i have backtested the strategy:
I apply a specific strategy on all the stocks ...
0
votes
1
answer
178
views
Variance and vol swaps backtest
I am looking to build a backtesting tool for variance and vol swaps. Would anyone have an idea if there is available data for it or am I better off backtesting it using vanilla options and replicating ...
4
votes
4
answers
1k
views
Backtesting in python continue build or buy available software
I started building a backtesting application in Python to backtest and optimize trading strategies, but I've paused to assess whether to continue development or purchase software to speed up further ...
0
votes
0
answers
164
views
Quantification of Complexity in Trading Systems
I am trying to define and quantify the complexity of a trading system, where complexity is measured by degrees of freedom as the sum of its rules and unique data points.
where:
...
1
vote
2
answers
331
views
Why discount results by 50%?
I am reading Harvey & Liu (2015) article, which says the following:
A common practice in evaluating backtests of trading strategies is to discount the
reported Sharpe ratios by 50%. There are ...
0
votes
0
answers
123
views
Seemingly under-estimated backtest performance of intraday trading
Suppose I have an intraday strategy that is flat at the beginning of the day and flat at the end of the day. I run the backtest and generates thousands and thousands of trades over say one year. ...
2
votes
2
answers
314
views
fast backtesting library in R
I’m looking for a fast library for backtest in R that supports limit orders, stop-losses, and take-profits. The library should be optimized for repeated historical testing and ideally ported from fast ...
5
votes
1
answer
873
views
Understanding the calibration of High-frequency trading in a limit order book
I am trying understand and replicate this thesis, which is based on, High-frequency trading in a limit order book by (Avellaneda and Stoikov, 2008) and Optimal market making, by Olivier Gueant, 2017, ...
4
votes
1
answer
413
views
Backtesting of VaR estimates
Regulators want to backtesting VaR estimates based on both Risk theoretical PnL and ...
1
vote
1
answer
1k
views
How does one calibrate lambda in a Avellaneda-Stoikov market making problem leading to Gueant-Lehalle-Tapia model?
The title is similar to that of the question I was referred to here which has been answered by Lehalle himself!
I'm trying to implement the Gueant-Lehalle-Tapia model which is how I got to this answer ...
0
votes
0
answers
215
views
Backtesting One-Factor HJM model with selling European Receiver Swaption
I am attempting back test the performance of a model - namely the Musiela equation used to model instantaneous forward rates with constant time to maturity:
$$r(t,x)=r(0,x)+\int_0^t\left(\frac{\...
4
votes
0
answers
199
views
How to take into account transaction fee of a backtest from a list of returns?
I have a list of booleans that correspond to buy and sell signals that I would like to backtest. To achieve this, I calculated the return ret of a security and when ...
6
votes
0
answers
442
views
PBO algorithm "The Probability of Backtest Overfitting" paper
In this article by Lopez de Prado et al., an algorithm was proposed for assessing the overfit of a trading strategy:
The Probability of Backtest Overfitting
There is also a package for R:
pbo: ...
0
votes
0
answers
166
views
Any document about general backtesting algorithm and data structure
(Note there are similar questions, with different focuses at this forum, but my focus is more on the general concept, if any, about backtesting (for stocks) and sources of information where I can go ...
1
vote
1
answer
589
views
Figuring out how TradingView calculates the Sharpe ratio [closed]
This is the simplest backtest I've come up with, yet I can't figure out how TradingView has calculated the Sharpe ratio to be 0.577. I've set the risk_free_rate=0. Is it possible to extract the ...
4
votes
1
answer
943
views
Proper way to backtest strategy using bootstrap method
Should I back-test in a single (original) price series and bootstrap the strategy returns to get statistics of interest?
Or should I create bootstrapped price series using bootstrapped returns from ...
2
votes
2
answers
441
views
Detrending price series for back testing
If I am testing a trend-following strategy, should I detrend the data before applying the rules or should I generate signals based on the original price series but use detrended data for performance ...
0
votes
1
answer
345
views
Validation set on Walk Forward Analysis
When backtesting a trading strategy using Walk Forward Analysis/Optimization, I see people split each window into training and testing sets.
Suppose you want to select the best combination of MAs for ...