I have a few financial variables of a stock universe like OHLC prices, volume, and other fundamentals with varying time-frequency. Using this set I'm creating an expression that gives the weights to be invested in that particular stock among the whole universe for a particular day.

For example, an expression can be something like

$$(close-open)/vwap$$ $$(close-average(close,10))/std(close,10)$$

The expression is evaluated on each stock of the universe and the final vector is normalized to arrive at the weights to be assigned for that particular stock. If the weight is positive, it means we are going long on that stock and if it is negative the direction is short and if the weight is 0, then no position is assigned for that particular stock.

This setting is repeated on past data and backtested to evaluate the performance of expression. Backtest reveals some parameters like Sharpe or absolute return etc.

Now given a fixed set of variables, operators, and functions that have some meta parameters, what is the best possible algorithm to find optimal expressions that result in good performance over the historic data(let us say all possible combinations which have a sharpe ratio above 4). Also, it would great to know if there are any algorithms in the literature instead of searching over the whole space of expressions, which can be used to artificially generate new expressions based on a training set created by humans which contains the sequence they used to arrive at a good expressions and expressions which didn't work (artificially generating new expressions).


1 Answer 1


The problem you describe can be handled as an optimization problem: evolve a program such that it maximizes some performance measure. The technique you may want to look into is called "Genetic Programming". For a financial application see for example Single versus Multiple Tree Genetic Programming for Dynamic Decision Making.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.