# Tagged Questions

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

141 views

### Calculation of Returns and Risk Metrics for L/S Portfolio

I am trying to build a test for a long/short portfolio. I am aiming for market neutral and have put together a long portfolio as well as a short portfolio (see below). However, I am not sure if I am ...
132 views

### Question about historical volatility ranking

I have seen this strategy example, which uses garch in a regime switching context: https://systematicinvestor.wordpress.com/2012/01/06/trading-using-garch-volatility-forecast/ The author classifies ...
387 views

### How do you estimate the capacity of a strategy from historical data?

What are some good ways to estimate the capacity of a strategy from historical data (including full market depth)? Obviously, a naive approach is that you want the strategy's returns to exceed its ...
105 views

### Daily or weekly data?

I am trying to test a strategy but do not know if I should use daily or weekly data? I have tried researching this & have found that daily data will bring " too much " noise compared to lower ...
151 views

### Simulating Stock's close, high and low prices

I am testing a model in which I need to simulate closing, high and low prices (i.e. 3 dimensions of prices) of any given stock. Using the simple Geometric Brownion Motion equation I can easily ...
114 views

### How to compute daily compounded backtest returns closer to real-world results?

I often run quick tests of trading strategies in my analytics suites by: multiplying a vector of signal (lagged, {-1,0,1}) with a time series of daily percentage returns doing a cumulative product ...
261 views

### Overlapping Value-at-Risk Backtest Data an Issue?

My understanding of VaR model back testing is thus: ~~ t: Calculate daily VaR using look back data over n past days t+1: Compare daily return against VaR, record breach if one occurred, repeat ...
1k views

### Expected Shortfall (CVaR) Backtesting

I am writing my thesis on VaR and ES risk measurements and have encountered some issues with how to best test the accuracy of ES estimates. My understanding of the topic is that backtesting ES ...
156 views

### Are there any software libraries for backtesting FX algorithms against tick data?

I've read question, however it doesn't appear as if any of those libraries work for FX data. A Google search for python forex backtesting turns up this project, ...
2k views

### Learn backtesting using MATLAB

What are some good ressources (books, articles, ...) to learn backtesting of investment strategies using MATLAB ? It can be strategies related to fixed-income, equities, derivatives, ... whatever. ...
954 views

### Backtesting with fundamentals

Recently I've read some books about quantative approach to fundamental investing: - What works on Wall Street - James O'Shaughnessy - Quantitative Value - Wesley Gray, Tobias Carlisle - Quantitative ...
71 views

### How to compare market values with model values after calibration?

After calibration the G2++ model for interest (with swaption volatilities), I want to statistically test the quality of the calibration by comparing market to model values. What is the best way to ...
75 views

I was asked this question in an interview and despite thinking about it for a while, I haven't been able to come up with a good answer. Suppose you have a strategy you are running where at certain ...
286 views

### Long/Short Backtesting Set up

I am going to be backtesting a Long/Short equity strategy and need some guidance on how best to deal with the short book. I was thinking that for each portfolio I would go long 50 equities and go ...
8k views

### What broker/feed/APIsetup allows for recording the most accurate data (cheaply)?

I'm currently using IB's Java API and getting feeds through them. However the real-time feed is updated only every 250ms and the historical feed only every second. I'm primarily looking for ES data ...
367 views

### How to calculate returns of backtested strategy?

Lets say I have some strategy (long/short) backtested for certain period. Strategy has entries/exits only at the end of the day and may have overnight positions hold. Now I would like to compare ...
2k views

### How to calculate the most realistic historical option prices with additional publicly available parameters

This is a follow up question of this one. My aim is to create the most realistic historical option prices possible with publicly available data. I want to do this for backtesting purposes. The ...
367 views

### How to account for market movement when some exchanges are closed?

Daily data, such as open and close prices, is often available for much longer periods than high-frequency data. However, whenever backtesting any strategy that examines instruments traded in different ...
181 views

### Back-testing Value at Risk with a WML investment strategy

I'm currently taking a course in Financial Econometrics and there is a question in the lecture notes regarding back-testing of VaR which I'm have difficulty with. First of all the procedure for ...
415 views

### How to select optimal betting strategy from backtest?

I have written a model for predicting the winner of UFC fights. My model calculates the probability of each fighter to win a given match. I have back tested the model and found it to be very ...
364 views

### Analog - Pattern Recognition model using KNN

I'm building a pattern recognition model for my master thesis. The idea is to build a framework with some Macro variables (long/short term rates; rates differential; equity; fx; vix) in order to find ...
267 views

### What data should be used for regression-based model backtesting?

I ran regressions using historical valuation data and now want to backtest the models I came up with. Are there any issues with using the same historical data set for the backtest that I need to be ...
3k views

### How to design a custom equity backtester?

I was thinking about writing my own backtester and I realize I have to make some assumptions. So I was hoping I could post what I am planning on doing and hopefully some of you can give me some ideas ...
202 views

### What is the most convenient data structure for backtesting a model of futures options prices?

I have an empirical model for the dynamics of futures prices in a particular market that I have implemented using a long series of the front five contracts. (I account for the roll in my model.) I ...
373 views

### How to find optimal look back in quant trading models

I'm in the process of building a quantitative trading model, I want to improve on the way in which I decide upon a look back length for the indicators. I understand the different pros/cons for very ...
898 views

### Handling Missing values in stocks returns when estimating the co variance matrix

What is the best way to handle missing values when stocks did not exist for the entire historical period?.
272 views

### Plot Evolution of portfolio weights over time in R [closed]

Is there any function for plotting the evolution of portfolio weights over time in r?. I have a matrix of portfolio weights from an equal weighting strategy at rebalancing times and want to plot ...
2k views

### What are the key risks to the quantitative strategy development process?

Prompted in part by this question on data snooping, I would be interested to know: What are the key risks that should be considered when developing a quantitative strategy based on: (a) historical ...
788 views

### What benchmark/index to use for backtesting a portfolio of stock options?

What benchmark should I use for backtesting a model for when I should buy an option of a particular stock? For equities, one could say their portfolio outperformed the S&P 500. I would like to ...
432 views

### Backtesting Period

Views on timeframes for backtesting vary considerably. Curious on what timeframe/trade size leads to a statistically significant result. For example, what backtest period is reasonable for a system ...
164 views

### Sharpe Ratio and time spent in loss

Is it possible to express, given an annualized Sharpe Ratio value, what is an expected maximum/average time spent in a draw-down or something in this manner? E.g. with SR of 10, you'd expect to spend ...
232 views

### How to backtest the VaR model?

I have a sorted historical P&L vector of 250 days and say, I want to calculate the 90% VaR on this distribution. I will look for the 225 element (90% * 250 = 225) and this will be my Value at ...
435 views

### analyze strategy performance with given matrix of weights/time and weekly returns in R

I have a matrix of 259 weekly returns, 50 assets and a portfolio composition for each of the 259 weeks. I would like to test the performance of the portfolio during 52 weeks, rebalancing every 12 ...
813 views

### Market Data For Project

I'm looking to find a service that will allow me to download historical data on stocks, bonds, options, futures, indices, etc and also to pick up new files either on a daily or weekly basis. I've been ...
540 views

### Machine Learning on matlab 2010

I am trying to develop a trading model. It uses certain technical and fundamental features and the model learns from the past. I have a 3-class output - bullish, neutral and bearish. On trying neural ...
270 views

### Comparing Backtests of Value-at-Risk and Expected Shortfall

My goal is to test if ES (CVaR) empirically is a better risk measure than VaR for a set of given variables (assumed underlying distribution, confidence level, sample size) for different asset classes. ...
518 views

### backtesting with open, close, high and low

I am quite notice at the business of backtesting for an automated strategy. I was wondering, can I/should I use High and Low for this purpose? On one hand, the algorithm will see these prices, but on ...
305 views

### adjusted close prices on SP500

When I look at the adjusted close prices of SP500, for example, I notice that the numbers are always significantly below the actual closing. In the explanation of what adjusted prices are, one gets ...
119 views

### how to make a distribution model tolerable of trend?

I'm building an model on different loans' NPL rate. The problem is NPL rates are always affected by the market. When NPL rates move in trend, my model will fail the back-testing. Assuming $x(t)$ is a ...
97 views

### How do I take an unbiased, sector neutral sample from a stock index?

I am looking to take a cross sector subset of a larger stock index universe. What steps to I take to assure that sector representation is as equal as possible to help smooth out my variance(while ...
673 views

### Testing Valuation, Size and Momentum (proprietary factors) from 1988-2013: No evidence of driving cross-sectional returns

I am currently testing whether three proprietary factors - Valuation, Size and Momentum - explain cross-sectional returns. A sample of 3000 securities was tested using Fama-MacBeth two-pass ...
273 views

### How to design back-testing (validation) for such modified Vasicek model?

Consider a classical Black Scholes model , $$\frac{dS}{S} = \mu dt + \sigma dW$$ , where $dW$ is a Brownian motion, that $W(t_1) - W(t_0) \sim N(0, t_1 - t_0)$. The back-testing strategy is ...
620 views

### How to get/estimate ask/bid price for backtesting for OHLC data? [closed]

As you know, most of the EOD data available have only OHLC price. I used to do back-testing using the Close price as both bid and ask. however, in real world, the bid and ask spread is huge and the ...
368 views

### How to most optimally perform currency conversions when backtesting on portfolio level?

I am currently expanding my own strategy profiling and testing platform which partly consists of a portfolio backtesting module. The backtest engine processes tick based data (quotes for currencies, ...
1k views

### backtesting options strategies in R

I would like to backtest an options strategy in R. I require the ability to delta hedge and rebalance to options in the portfolio at different frequencies (daily, monthly,etc.) What packages are the ...
425 views

### How to test the efficiency of Exponential Moving Averages as a trading startegy? [closed]

I would like to know how I can test the efficiency of Exponential Moving Averages when it comes to forex trading. Can i have any papers that point to the efficiency of this strategy? Thank you. :)
301 views

### Quant/Stat Factor Performance Website/Distribution?

Does anyone know of a decent quant/stat factor website, distribution(public or private) or publication that tracks performance of "many" of traditional quant/stat factors? By that I mean would show ...
640 views

### Software for backtesting outside strategies (CSV transaction upload)

I've developed some software which generates sets of trades, and I'd like to backtest those trades. My software currently outputs a CSV file with details of each trade: ...