Questions tagged [backtesting]

The process of evaluating a strategy, theory, or model by applying it to historical data.

Filter by
Sorted by
Tagged with
1
vote
3answers
124 views

Backtesting Option Strategies with IV Data Only

I’ve tried to find a good answer for this but had no luck so I’m bringing it here: potentially beginner question, but how much accuracy would I be sacrificing by backtesting an options strategy with ...
0
votes
0answers
26 views

Where to get Historical Intraday data from S&P500 with delisted stocks for free?

I am under 18 and do not have a credit card to purchase this data to test my investment strategy. So what should I do?
0
votes
0answers
52 views

how to adjust very old stock price correctly

lets say that i have a file stating a stock and the price which someone paid for it and the date. for example: apple (AAPL) 422$ 15/11/2011. now apple have gone through many splits and possibly public ...
0
votes
1answer
45 views

Where can I find historical daily market prices for long term treasury bonds? [duplicate]

I want to backtest some portfolios that involve leveraged long term treasury bond funds like TMF, at least as far back as the 1970s. Since there does not seem to be any T-bond ETFs with history going ...
0
votes
1answer
130 views

Workflow in algorithmic strategies

Sorry for the basic question, I'm trying to educate myself on algorithmic strategies. Just to see how it works, my idea is to create a simple moving average strategy. Let us suppose I have $N$ ...
0
votes
0answers
11 views

Fundamental metrics associated with company risk [closed]

I have some "alternative data" and I would like to check how useful they are to predict company fundamentals. In particular, I am concerned about the fundamentals (or better metrics/ratios ...
1
vote
0answers
51 views

Normalized statistical risk/reward measures to compare different quant trading strategy's returns, eg for backtesting

Want to select a metric or metrics to compare returns of different investment strategies, for quantitative backtesting, strategy selection, and forward measurement. Been reading different approaches ...
1
vote
1answer
93 views

Backtest: Fast Reconstruction of Order Book using Order Creation/Completion Data in Python

I am looking for a quick way to reconstruct the order book at the time of each new limit order creation. The data I have is order creation and completion: OrderID time_created time_completed price a ...
0
votes
0answers
39 views

Train, validation and test sets for strategy without machine learning

Let's say we have a simple strategy where we buy / sell one stock depending on the value of a rolling mean on the x last days. So the only parameter is the number of days. Would it make sense to do ...
0
votes
0answers
23 views

fulfilling the condition for backtesting scalping technique

I am backtesting scalping technique with the 3 sma, in aligator indicator. One of the conditions for scalping long, would be to see alll the three ema's are radiating out from one another as in the ...
-3
votes
1answer
104 views

How to calculate return on a series of long position for each price point

The return between two price points can be calculated as Price(present)/Price(previous) -1 Or, it can be expressed as ...
1
vote
0answers
78 views

Backtesting - treatment of holidays for global (i.e. multi-market) portfolios

Assume a daily trading strategy where each day we rebalance our portfolio weights: Situation A: all constituents of our portfolio are from the same market (e.g. a portfolio of S&P 500 stocks) ...
0
votes
0answers
38 views

Backtesting Hedged Equity Portfolio with Options

I am trying to find some papers and methodologies on backtesting an Equity portfolio with broad-based index options as hedge. For example, take SPY and systematically hedge it with 9 months 30 delta ...
0
votes
1answer
86 views

Out of Sample Results Decay Rapidly With Prediction Window or Embargo

So I am beginning to dabble my toe into quantitative finance and am trying to validate some model results and am having difficulty thinking about what they tell me. Here's my situation: I'm trying to ...
2
votes
1answer
223 views

backtesting guide for research

I am a master student in finance and I am working on my portfolio management thesis. Within my thesis I will have to backtest a portfolio strategy for a balanced portfolio. I am looking for a guide/ ...
0
votes
1answer
46 views

Continuous futures data roll adjustment

When I construct continuous futures data (Wheat futures for example), I get different results than barchart or tradingview. Examples below. The 1st image is my adjusted continuous data and the 2nd ...
0
votes
1answer
112 views

Alternatives to RDBMS for options backtesting

I've assembled a large dataset (~2B+ records) of options price data in MySQL for backtesting purposes. At a number of points, due to the sheer amount of data being retrieved and filtered, processing ...
0
votes
0answers
78 views

Backtesting 130/30 Long-Short Equity Portfolio

I am wanting to test how a 130/30 long/short strategy would perform over a 10 year period using the Nasdaq 100 as my benchmark to select long and short positions from. I want to rank the Nasdaq 100 on ...
2
votes
1answer
210 views

python library for backtesting buying and selling multiple cryptos

What is a good python backtesting library to use if I want to test buying and selling a list of different cryptocurrencies every day? Most libraries I find like backtesting.py and pyalgotrade are ...
1
vote
1answer
115 views

How to conduct statistical test to see if certain factors impact trading streategy

Since the seminal paper by Fama and French(1993) that uses size, market, and value factors to explain extra market returns on the equity market, people have conducted tons of research on equity factor ...
0
votes
1answer
184 views

Is there a Python package that implements backtesting for VaR?

I would like to use the tests of Christoffersen (1998), Engle and Manganelli (2004) or Kupiec (1995) to evaluate how good are the VaRs that I have projected. Is there a library that implements these ...
0
votes
0answers
44 views

Free Software for plotting OHLC data

I have OHLC data in the following format from 2011 onwards : Instrument Date Time Open High Low Close NIFTY 20080101 9:55 6138.6 6154.6 6138.6 6148.9 NIFTY 20080101 9:56 6149.75 6149.75 6132.8 6132....
0
votes
0answers
42 views

increasing leverage does not increase MDD(maximal draw down) proportionally?

I thought increasing leverage by x times will increase mdd x times. But it actually increases mdd by y which is smaller than x. Is it always the case? If so, because leverage increases compound ...
8
votes
1answer
282 views

Why is it wrong to rank stocks by P/E ratio, sell the top quartile, and buy the bottom quartile?

I am reading Advances in Financial Machine Learning by Marcos López de Prado. In chapter 11 The Dangers of Backtesting, exercise 11.5 asks: We download P/E ratios from Bloomberg, rank stocks every ...
0
votes
1answer
169 views

Include Dollar Cost Averaging Strategy in BT python

I am using bt backtesting to test between an initial lump sum into 'ETH-USD' and a dollar cost average approach. I will then look into a different mix of equally weighted crypto. What I like about bt ...
0
votes
0answers
43 views

Backtrader plotting in jupyter lab

folks. I'm learning how to work with Backtrader library and ran into a problem: I've parsed OHLCV data with Date as index and as I see it works ok, but the problem is that I can't plot it, it just ...
0
votes
0answers
82 views

Calculating Rolling P&L of Trade Log

I have an extensive trade log of historical buy and sell orders and I am trying to calculate the running p&l of the trading results. Most rows represent partial fills where there is still a ...
0
votes
0answers
65 views

Backtesting Value-At-Risk (20-days)

I calculate the 20-day returns of (rolling window) of historical stock prices of 2 years. Are there any problems (like autocorrelation) when I want to backtest the VaR (Value-at-Risk) model?
5
votes
1answer
392 views

why does Cross Validation *not* solve Backtest overfitting?

In this famous paper, Bailey and De Prado discard Cross Validation as tool to check for Backtest overfitting, on the ground that it is just an holdout method: ... If we apply the holdout method ...
3
votes
0answers
85 views

How to backtest multilegged options strategies?

I have got historical data for the index options. Now I am looking at backtesting some of my strategies with this historical data. I would like to backtest strategies like selling a straddle and ...
0
votes
0answers
102 views

Train/test: why 80:20 split performed better than 90:10 split?

Playing with Random Forest Classifier, I am wondering what could cause in a 80:20 split the test results to perform better than in a 90:10 split? With 2000+ data points and: with 80:20 split, ...
0
votes
0answers
118 views

Historical ISM report on business?

Is there any place to download historical ISM ROB (report on business)? The website only shows current and previous month. ISM ROB
0
votes
1answer
126 views

Understanding Look Back Period

When people say look back period of 6 months, how does that data look like? Are that 6 months of raw data or a weighted average of that data? I am a little confused on how you come up with beta values ...
0
votes
3answers
332 views

Where can I find complete historical lists of companies on major US exchanges for backtesting?

I am backtesting a trading strategy on historical US stock data. I'm currently sourcing data from S&P's Capital IQ. I have no trouble getting stock price data for a specific company. I also have ...
2
votes
0answers
50 views

Backtesting of outperformance of a benchmark using the Deflated Sharpe Ratio

I want to test whether, let's say, strategy A outperforms strategy B. In Marcos López de Prado's book Advances in Financial Machine Learning he presents the following statistics: The Probalistic ...
0
votes
1answer
119 views

Algorithm / source to calculate historical expiry dates of futures

I can find several source on this site where to find expiry dates of coming futures contracts. I am looking for a (e.g. Python) algorithm or a data source where I can find historical dates when a ...
1
vote
0answers
89 views

How to backtest with fixed-income instruments

I'm running a backtest with the 5-yr and the 30-yr treasury bills going back to 1990, both with a weighting of 25%. How do I use their daily yields to adjust the portfolio through time? I've thought ...
0
votes
0answers
38 views

Where to find Historical price data (csv preferable) for global Gov bonds and markets. All dollar denominated?

I'm doing a lengthy backtest on a certain portfolio and i've managed to get FTSE 100 data going back to 05-30-1990, where could I find data for global Government bonds going back to that date? A csv ...
1
vote
0answers
48 views

Spread betting risk management in backtesting in Python

My background is in Spread Betting. I know how to calculate my position size based on how far away my stop is from my entry, I calculate the amount per pip so that I only ever risk a fixed percentage ...
4
votes
0answers
121 views

Finding optimal calendar spreads and diagonals

I am looking for some pointers on risk/return profiles of calendar spreads and diagonals with different strikes and expiration dates, preferably based on historical backtests with SPY options. Please ...
0
votes
0answers
81 views

Starting out with back testing

I am new to quant, but have skirted around the various competencies required. I have a couple of engineering degrees; a masters in finance, and I also work as a relationship director in a commercial ...
0
votes
0answers
60 views

Backtesting a permanent portfolio

I'm looking to backtest this portfolio: Global Bonds, gold, Global Stocks, short-term t-bills (1/4 each) from 1990 up to this year, rebalanced monthly. Then take a variety of statistics on the time ...
1
vote
0answers
41 views

Exchange order matching system/core for local testing

I am looking for a service that can be deployed locally or connected to it and would emulate the order matching system of exchange (a.k.a matching core). I remember, that I have seen on GitHub repo, ...
0
votes
3answers
187 views

Historical Ticker Symbols Data Source (for Creating Tradable Universe)

I would've guessed this question would have been answered somewhere on here before, but I have been going down rabbit holes for days trying to figure it out with no luck... I want to backtest ...
3
votes
4answers
720 views

Alternatives to Zipline backtester / Alternatives to futures data from Quandl

I intend to set up a fully automated system for trading equities and futures. As preparation for this project, I worked through a couple of books on the topic, e.g., "Trading Evolved" by ...
0
votes
0answers
29 views

Historical Economic Release Calendar

Does anyone know if any providers have a historical economic release calendar? For example, releases of things like ADP private employment, or ISM surveys? I ask because I would like to backtest a ...
0
votes
0answers
223 views

How to backtest using portfolio compositions in python using backtrader

I have a csv file / pandas dataframe which looks like this. It contains various portfolio compositions for different strategies. Mostly based on different optimisation methods, max sharpe, min VaR etc....
0
votes
0answers
25 views

Backtesting python libraries [duplicate]

Might there be any backtesting libraries in Python that computes the various statistics (Sharpe Ratio, Calmar Ratio, drawdown, win rate etc) given a dataframe of holdings and its holding duration (...
0
votes
0answers
51 views

Is there a way to predict backtest or walk-forward performance using linear regression results?

For the sake of example, say I regress S&P 500 returns (dependent variable) against small-minus-big market cap size (independent variable) and get a coefficient of 0.1 and an $R^2$ of 0.9. Is ...
0
votes
0answers
38 views

Backtesting multiple portfolio optimisation and trading strategies using number of stocks to purchase as input

I want to backtest a trading strategy + portfolio optimization but I have never used a backtesting program before. I am comfortable with python I think. My outputs from my trading logic (after ...

1
2 3 4 5
7