Skip to content
All library documents

Turning Price Forecasts into a Trading and Risk Optimization Problem

Article Quant Q&A · Author: andrewH

Summary

The document distinguishes forecasting a security’s daily high and low from deciding how to trade on those forecasts. The author reports using an ensemble of forecasting methods and evaluating historical errors, including their dispersion and frequency of extreme outcomes, while guarding against look-ahead bias and overfitting. They note that forecast errors have heavier tails than a normal distribution and that prices have historically reached different fractions or multiples of forecast ranges at varying frequencies.

The practical questions include position size, when to trade, entry timing, exit levels, and protection against adverse moves or margin calls. The response frames these choices as an optimization problem: specify the objective and constraints, then tune strategy parameters through backtesting. This is a general framework rather than a worked trading system. The document gives no objective function, constraints, implementation details, or performance evidence, and its brief recommendation does not resolve how to handle tail risk, execution costs, or uncertainty about the order in which daily extremes occur.

Key ideas

  • A useful price forecast does not by itself determine entries, exits, or position size.
  • Trading rules can be framed as an optimization problem with an explicit objective and constraints.
  • Backtesting can be used to tune strategy parameters after the problem is specified.
  • The forecast evaluation described accounts for historical error dispersion and extreme outcomes.
  • No specific optimized strategy or performance results are provided.

Tags

Full text
# Strategies for trading on a forecast


# Strategies for trading on a forecast












I have been experimenting with multiple methods of forecasting the daily high and low for a certain security. I have found a very basic ensemble of several common forecasting approaches is, well, highly imperfect, but better than throwing darts at a dart board. And I have a number of measures of forecast quality on historic data (but being careful to avoid look-ahead and over-fitting), such as the variance of my forecasting error and the frequency of extreme events. (The distribution definitely has tails too fat to be normal). Also, I know how often the market has historically reached various fractions and multiples of my high and low forecasts.

Here is my question: When I started playing with this, I imagined that once I had a forecast, I was done. Buy if you forecast it to go up, short if you forecast it to go down. But as I have become satisfied with my forecast, I have become more and more dissatisfied with my trading strategy. In a typical day the market reaches both above and below its opening price, and there are a large number of decisions that I do not know how to make, even though I know a lot about my forecast's quality. I need some resources, not on forecasting, but on the aspects of trading strategy besides having a forecast. Here are examples of the kind of questions I am talking about example:

- What share of my assets should I put up on a given day?

- Should I trade every day, or only when the forecast does some particular thing?

- My forecast is always of the price change relative to the opening price. Should I decide if I will go long or short when the market opens, or, e.g., if my overall forecast is for a price rise, wait until the market hits some fraction of my forecast low?

- My forecasts are unbiased. So historically I have not reached the forecast high and lows about half the time. How do I decide at what price to sell (if long) or cover (if short)? Days with a high forecast volatility are potentially the most profitable, but I don't know how much I am at risk of a margin call even though my forecast ultimately comes true. (One thing I do not have is a forecast of whether the high or the low comes first).

- How can I best insulate myself from the occasional extreme price movement against my position?

I think that should provide some idea of the kind of thing I am looking for. It seems like I should be able to answer all of these questions based on how the affect the expected value of the bottom line, but I sure don't know how. I've been looking for a literature on this, and found almost nothing, other than some interesting stuff on the Kelly criterion and a whole bunch of things I can not use, like optimal portfolio theory, or short-term market predictions based on moving averages and resistance points. Heck, weather. Traffic. Tweets.

Can anyone suggest where I should start in educating myself on these matters? Even more productive search terms for looking for these answers would be welcome.

## Answer by JPN (score 2)

https://quant.stackexchange.com/a/68502

You should frame this as an optimization problem.

What are you trying to maximize? What are your constraints?

Once you set up the problem, you'll need to optimize for the hyperparameters. That's where backtesting comes in.

Check out this for inspiration:

https://web.stanford.edu/~boyd/papers/pdf/cvx_portfolio.pdf

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.