How to create a model or formula for evaluating trade opportunities

I want to build a formula to produce a score for a potential trade based on 4 variables, time, return, liquidity of security, and probability of failure. For a set of potential trades I first attempted ordering them by producing a score = (1/time) * return * liquidity * (1/probability). So higher scores are better, i.e., ideal trades are short in duration, high in return and in liquidity of security, and low in probability of failure. However, I want the formula to take into account higher return trades and allow flexibility to a point in the probability of failure and liquidity.. So for example for these 2 trades:

Days, Liquidity, Return, Probability

2, 100, 0.4%, 0.6%

5, 300, 4%, 7.4%

Ratios: (Days)=2.5, ,Liquidity=3, Return=10, Probability=12.3

I would want a formula to score the second trade higher, though I'd want to cap the probability based on the level of return as well as consider time, so I'd be willing to accept a 7% or 8% chance of failure for a 4% return in 5 days, but not in 40 days, and not for a .5% return in 5 days, etc.. Also, if the liquidity of the second trade was very little, say 10, then it should score trade 1 higher even though the return is higher and the probability is acceptable.

How could I go about producing a formula to model this relationship? I tried OLS, but the resulting error was high, so the formula was not usable. Any advice?

I think you are pretty much mixing apples with oranges in your formula :-)

A slightly more meaningful, but yet very simple approach, could be first of all to "normalize" each score in the interval [0, 1]:

                 Value - Min Value
Index01 =     ----------------------
Max Value - Min Value


(your quantities are all positive, so it's ok).

Then you might, for instance, put them together by making a weighted average, where the weight would express the importance you attribute to that component:

  Sum of (Index01 * Weight) / (Sum of Weights)


PS. If that composite index is useful for trading or makes sense at all, is another matter

I think the only thing throwing your desired results for these examples is the 12-fold advantage given by the probability. You could consider using a (natural) log of the probability, which would dampen the advantage (in this case) to two-fold (and take the negative, as I presume all your probabilities are <= 1).

That said, beware tailoring your algorithms to suit any specific data, as you are hopefully aware.

Here are some quick fixes to your problems:

1. return should not be 0.4% or 4%, but 1.004 or 1.04, respectively.

2. probability of failure (by the way, what is that? losing everything? Losing an amount equal to potential gain?) should be subtracted from 1, not reciprocal: $1-P$ rather than $1/P$.

This is more rational and will already fulfill your wish of putting the second trade (58) ahead of the first (50).

More generally, however, my advice would be to stay away from "scoring" quantities that have [different] units. I don't know how you're measuring liquidity, but if it does not have units then your "score" actually has units of 1/time (if liquidity is in dollars, than your score is actually dollars/day). I am not sure how you would model the effect of liquidity on expected return [personally, I stay away from all but the the most liquid securities].

What are you really trying to measure? Best expected return per trade? Best expected return per annum? Probabilities? Something else? Whatever it is, define how each variable affects your desired result and frame it in appropriate units/dimensions. For example, let's say you want to achieve the highest possible return per day. Examine how each variable would affect this goal. I suspect you would need at least a few more inputs, e.g. transaction costs $T$, worst case ("failure") loss, etc.

Expected return $R$ is often defined as something like $gain × (1 - P) + loss × P - T$. (note that what I called gain here is what you originally call return, I believe).

Your expected daily return might then be defined as $R^{1/t}$, where $t$ is the time in days.

So for example, if your expected return comes out to be 5% but takes five days to realize, the expected daily return would be $1.05^{1/5} = 1.0098 (0.98\%)$ - just under 1%, as expected (remember compounding).