Optimal f

Discussions about Money Management and Risk Control.
PS
Contributing Member
Contributing Member
Posts: 8
Joined: Mon Sep 13, 2004 9:21 am

Post by PS »

>Controlling risk is the absolute number one priority, not optimization. Although >important, optimization is only secondary in importance.

1. Any problem of risk management/control can be re-formulated as some optimization problem.
2. The same risk control procedure that is applied to Kelly’s value or optimal f may be applied to other optimal solutions.
3. Could you please describe the risk control procedure in more detail? I have some doubts that exists a correct procedure, which uses something close to “garbageâ€
ksberg
Roundtable Knight
Roundtable Knight
Posts: 208
Joined: Fri Jan 23, 2004 1:39 am
Location: San Diego

Optimizing Product

Post by ksberg »

PS. Michael Bryant wrote an article some time back for Stocks and Commodities Magazine which described his use of sizing optimization. Here is a link to a page that gives some background and leads to a product that lets you experiment with optimal sizing with limits like you mention. I don't have any ties to the product, but do have experience coding and testing many sizing strategies for custom software similar to this. My recommendation would be to set up something like this and find out what it means for yourself.

Cheers,

Kevin
MCT
Roundtable Knight
Roundtable Knight
Posts: 102
Joined: Fri May 16, 2003 7:27 pm

Post by MCT »

MCT wrote:
And time, my friend, makes it difficult to determine what’s really optimal. You can't determine what your profit will be, but you can determine what your loss will be.
PS Wrote:
This is a person dependent issue.
Anyone who know what he want can establish goals and can design strategies which maximize the chances to reach these goals.
It’s my opinion it’s not a person dependent issue, this is a universal issue. I don’t know anyone who can determine what their profit will be, tomorrow, next month, next year, or any future time. Losing or quantifying something you already possess is much simpler than generating future profits.

What is optimal is not some exact magic number, it’s simply a none stationary line in the sand that separates optimal and none optimal regions; if time wasn’t an issue, we all would have been able to pin down what's optimal. MJ described it best as the cliff-of-death, and it all depends how close you’d like to get.

Assumptions regarding the nature of time are always embedded in any hypothesis, including the one you propose. I’ll try to take a simple a stab at it.
The first criterion is to minimize the probability to lose the initial capital (bankroll).
The second criterion is to maximize the probability to reach the target profit or sum.
Your first criterion can be approximated using standard statistics.

You might define risk as a worst case loss scenario. It could be based on a run of losses with a less than a one percent probability of occurring, calculated by your expected win/loss ratio. If your luck is running at .40, you have approximately a less than 1% chance you will see ten losses in a row. You could decide the worst drawdown you can stomach and divide that by ten which will give you your allowable risk per trade. Nothing fancy, just straight forward simple math. As you said, just about any fixed-fraction betting strategy would satisfy this criterion.

The second criterion is not so simple. 1) You are largely dealing with uncertainty or the unknown. 2) It cannot be defined clearly enough to quantify. 3) Since, what’s optimal changes with a series of trades, timing of trades becomes an essential element of your strategy. 4) Any statistical study of criterion #2 deals with a form of distribution that has time in it – also known as process. We know very little about such distributions at this stage of our evolution. 5) Stationarity is a much more serious issue, with #2 than #1, with deadly consequences. 6) Last but not least an optimal strategy that takes into account both criterions is a more dangerous route since it could drastically raise the threshold of ones risk of ruin. Unlike risk, reward does not necessarily increase with time, and this distinction is crucial. For example, a position held for a long period of time may simply lose more money, and may never realize any type of reward, but risk will always be present.
On this stage we have multi-criteria optimization problem. The solution of this problem is a set of fixed-fraction betting strategies. On this set it is possible to consider the next optimization problem: maximize expected value of the total sum (bankroll+profit/loss). This solution is free from artificial assuptions about the criteria.
I’m of the opinion, subjectivity and assumptions are the very heart of trading, no matter your approach to the markets.

In general, the issue you present is EXTREMELY important. Many years ago I concluded I’d become a hybrid trader. I utilize a more flexible rule based discretion for entries, exits, and market selection. I’m either aggressive or defensive depending on general market conditions. I find this has maximized the expectancy of my system. I believe, reward is a function of timing of entry and exit rather than simply the length of time a position is held. A well timed trade that runs for a long period of time is nirvana. I guess we all have to find our niche.
PS
Contributing Member
Contributing Member
Posts: 8
Joined: Mon Sep 13, 2004 9:21 am

Post by PS »

>What is optimal is not some exact magic number, it’s simply a none >stationary line in the sand that separates optimal and none optimal >regions;

It seems we are talking about different stages in modeling process. There are three stages. On the first stage the assuptions are made about time unit, time interval, probabilities, etc. This is very delicate stage on which we introduce subjectivity and which depend on talents of modellers. Once we do that, we have some mathematical problem. The solution of this problem (for example, optimal solution of an optimization problem) is a concrete solution free from any subjectivity and magic.
The second stage consist in finding the solution, and the third stage consist in interpreting this abstract solution back to real problem and taking actions.

My mentions of optimal solutions were refered to the second stage.
MCT
Roundtable Knight
Roundtable Knight
Posts: 102
Joined: Fri May 16, 2003 7:27 pm

Post by MCT »

You are correct, in that my focus was on stage 1 as you define it. I think the basics are supremely important. If one impregnates a model with certain assumptions that have nothing to do with reality, the real world results would not be very pleasant. If a doctor did the equivalent he could end up killing his patients. Unlike simulated laboratory experiments, a controlled clinical study of stage one is a more truth revealing approach than blind number crunching.
It seems we are talking about different stages in modeling process.
What I’m actually saying is the apparent distributions we observe in process modeling do not have stable properties over time. This is not a problem about fat tails; I’m actually saying the shape of the curve actually changes. If you move onto stage two without addressing this conundrum, you might not kill a patient but you might end up loosing money :wink: . Reality always has a funny way of revealing the truth.
ksberg
Roundtable Knight
Roundtable Knight
Posts: 208
Joined: Fri Jan 23, 2004 1:39 am
Location: San Diego

Post by ksberg »

One One of the things I find valuable about the Turtle Roundtable is a pragmatic focus. Sometimes members are known to prompt "what do your results say", which is a way to encourage people to share based on actual findings and experiences. So, my question is this: How can we ground the current discussion and move the ball forward in a way that is something beyond opinion and philosophy; in a way that can be implemented, verified, and applied?

Since we're talking about models, what is the mathematics, algorithm, or strategy behind what might be an appropriate model? If you have a model in mind, what information does it reveal?

Cheers,

Kevin
MCT
Roundtable Knight
Roundtable Knight
Posts: 102
Joined: Fri May 16, 2003 7:27 pm

Post by MCT »

hi Kevin
One One of the things I find valuable about the Turtle Roundtable is a pragmatic focus. Sometimes members are known to prompt "what do your results say", which is a way to encourage people to share based on actual findings and experiences.
Hi Kevin

I realize, very well, the favorite question on this forum is "what do your results say?" I come from a different and close to data-mining free approach grounded in real time historical trading results. I, instead, tend to ask “what do the results mean?â€
PS
Contributing Member
Contributing Member
Posts: 8
Joined: Mon Sep 13, 2004 9:21 am

Post by PS »

>I think the basics are supremely important.
>If one impregnates a model with certain assumptions that have nothing >to do with >reality, the real world results would not be very pleasant.

I agree with you on 200%. The purpose of my post was to figure out which optimal fixed fraction betting strategy model relies on the most solid and realistic assumptions.

>What I’m actually saying is the apparent distributions we observe in >process modeling do >not have stable properties over time.

This depends on the type of the market you are trying to model. If you mean stock markets then I agree with you because the nature of stock markets is not statistical it is “cooperative (or manipulative) gameâ€
TC
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Thu Jul 08, 2004 2:12 pm
Location: Toronto, Canada

Post by TC »

Kevin & MCT

Agree with you both, since I was both wondering what the practical benefits were of this somewhat arcane discourse whilst at the same time chiding myself for not revisiting Optimal f with a more open mind.

I am ever-eager to translate ideas, concepts, theories et al into tangible, real-world practices but am struggling to see any benefit in Optimal f. As a theoretical construct it may have some merit but does anyone really trade it ??

Optimal f seems to offer the optimal route to either googols of dollars or financial oblivion, and not much in between.

Tom
GammaTrader
Contributing Member
Contributing Member
Posts: 5
Joined: Thu Aug 19, 2004 4:13 pm
Location: Duluth, MN

Post by GammaTrader »

TC wrote: I am ever-eager to translate ideas, concepts, theories et al into tangible, real-world practices but am struggling to see any benefit in Optimal f. As a theoretical construct it may have some merit but does anyone really trade it ??
Yes, there are those who definitely trade using Optimal f. Option guys like me and off-floor traders who use option constructs to absolutely limit their risk. (Think--guys like Nassim Taleb)

If you can be certain that your risk in your optimal f'd :lol: trading scenario is limited because of options purchased, the formula works perfectly. What hurts the Optimal f concept is that system-killer (and system-trader-killer) losses tend to get bigger as the time factor increases.

You want to become an option trader?

GammaTrader
TC
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Thu Jul 08, 2004 2:12 pm
Location: Toronto, Canada

Post by TC »

Hi Gamma
GammaTrader wrote:
You want to become an option trader?

GammaTrader

Aint smart enough for that, it's all Greek to me !! :wink:

Did briefly consider options on futures to hedge my long exposure on equities but didn't pursue it.

Any good (that means simple) books laying out the basics that you'd recommend ?

Looks to be expensive to trade and seems like the smart money writes rather than trades.

How easy is it (relative to stocks & futures) to find an edge, and what's yours ? :lol:

Regards

Tom
GammaTrader
Contributing Member
Contributing Member
Posts: 5
Joined: Thu Aug 19, 2004 4:13 pm
Location: Duluth, MN

Post by GammaTrader »

TC wrote:Hi Gamma...,

Any good (that means simple) books laying out the basics that you'd recommend ?

Looks to be expensive to trade and seems like the smart money writes rather than trades.

How easy is it (relative to stocks & futures) to find an edge, and what's yours ? :lol:

Regards

Tom
Being an options trader is a separate world from positional futures trading, but there are important similarities. They are both systems of risk management.

Although straight futures traders don't realize it, most professional option traders are very long term traders. Probably longer term than most traders on this forum. When someone buys a USZ5 116 call, the seller is holding the other end for a long time. This is a major component of the option trader edge. Time value of money.

When options are sold (written), they usually stay on the option trader's statements until they expire. This means that the trader has to manage a burgeoning position entering futures and buying offsetting options to balance the greeks to keep potential risks in line.

Then, when another risk selected trade comes along, the process expands. Usually option expiration is a happy time, so most of the sold puts and calls expire and I can take a vacation for a few days. :D

My edge is the difference between what I receive for the options I sell and what it costs to manage the risk until their expirations. The best management technique is using options to hedge off the options I've sold. It's more dynamic, with a greater likelihood of doing the job with less followup adjustments being needed.

My edge is buying and selling premium with a directional and time bias. I purchase calls/puts in the direction of the working trend and sell others in time periods or price areas less likely to be threatened by future action. Although my "system" is about 80-90% mechanical, you do need a fair understanding of what structures are possible in the option world to keep the risk controlled.

I am certain that eventually all competitive long term traders will trade this way. The benefit is you don't get whipsawed as much and you should be able to catch all major trends with less risk and greater size for the same account size that would be trading futures only. The negative is you have to learn more, or have someone on staff to do the derivative work. But for the bigger potential, maybe it is worth it.

There is the additional informational edge which you reap from trading options which mitigates potential drawdowns. You get this because option trading is something very few long term traders are willing to tackle. They figure that it's enough to tinker with money management and diversify amongst many markets instead of branching out in a complicated field.

Here are a couple of decent books which are "simple" but have unique points of view about obtaining and harvesting consistent edges.

The Options Workbook: Fundamental Spread Concept Strategies for Investors and Traders, by Market Wizards's Tony Saliba --- He comfortably explains under what circumstances the option markets are exploitable. Great background book.

Option Secrets-Never Before Seen Techiques, by David Rivera --- This is a book with option software included, with effective structures for trading futures and stock trends with low risk. Rivera explains how relative beginners can get an edge identical to that of pros.

There are much more complex books available, but if you can't understand them very well, it is hard to get the information they contain. Like everything, there is a learning curve to trading options profitably.

For every $1000 of option premium I sell, I buy $666 of options to hedge it. This enables me to let wasting time value work for me, while having the potential of making money if an extreme move takes place in any direction because of the deltas I buy to hedge myself.

But, as in everything in trading, there are tradeoffs. Complexity has costs too. We all have to make our own choices.

GammaTrader
TC
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Thu Jul 08, 2004 2:12 pm
Location: Toronto, Canada

Post by TC »

Gamma

Thanks for the informative post, you have piqued my interest sufficiently that I'm going to get Saliba's book, I've always wanted to learn a new language !!

How many markets do you have to trade to diversify your risk and what strategies would you recommend to neophyte options traders ?

Also, if I may indulge with a follow-up, assuming that the oft-quoted statistic that 90% of options expire worthless is broadly correct, wouldn't writing options offer a more appealing risk:reward profile than buying them ?

Thanks

Tom
blueberrycake
Roundtable Knight
Roundtable Knight
Posts: 125
Joined: Mon Apr 21, 2003 11:04 pm
Location: California

Post by blueberrycake »

TC wrote: Also, if I may indulge with a follow-up, assuming that the oft-quoted statistic that 90% of options expire worthless is broadly correct,
This 90% number strikes me as entirely meaningless unless we know the net value of those that expire worthless vs those that are in the money.

Imagine an option seller sells 10 options at an average price of $1. If 9 expire worthless, while the last one is in the money for $11 at expiration, your option seller is a net loser even though 90% of his options expired worthless.

-bbc
ksberg
Roundtable Knight
Roundtable Knight
Posts: 208
Joined: Fri Jan 23, 2004 1:39 am
Location: San Diego

Post by ksberg »

TC wrote:I am ever-eager to translate ideas, concepts, theories et al into tangible, real-world practices but am struggling to see any benefit in Optimal f. As a theoretical construct it may have some merit but does anyone really trade it ??
Read the prior posts and you'll see that I am not an advocate of trading straight-up Optimal-f. I also mention some alternative practical applications, such as system metrics. For instance, given two systems with roughly equivalent MAR ratio, I will always choose the system that yeilds the highest Optimal-f ratio.

Getting back to practical optimization, I think the framework and mechanics for Optimal-f offers a great starting point. The core problem with straight Optimal-f is not the mechanics, but how it defines "what is optimal". It optimizes net return at all costs (Terminal Wealth Relative, or TWR in Optimal-f lingo). I think the first example to re-wiring Optimal-f is discarding all values that result in drawdown greater than X%.

Take a look at the code for Optimal-f, and modify this section ...

Code: Select all

   double X = 0.50;
   for(i=0;i<len;i++) {
      hpr = 1 + (f * (trxns[i]/_absLargestLoss));
      twr = twr*hpr;

      if (twr < X) { // <== NEW CODE BLOCK
        twr = 0.0;
        break;
      }
   }
This example discards all results where initial capital drawdown is greater than 50%. Hence, in 4 or so lines we now have a realistic constraint on the growth function. Now this modified Optimal-f algorithm is optimal within the constraint. By using some inginuity, we could use other constraints or even make the constraints extensible.

Not so abstract, and not all that hard.

Cheers,

Kevin
ksberg
Roundtable Knight
Roundtable Knight
Posts: 208
Joined: Fri Jan 23, 2004 1:39 am
Location: San Diego

One more thing ...

Post by ksberg »

Ok, I'll add one more twist ... Turn the above constrained optimal fraction into a simple Monte Carlo run by selecting permutations of the transactions input array, building a distribution of constrained optimal result values, then picking the distribution median. These techniques should go a long way toward finding a stable optimal bet size.

Cheers,

Kevin

[edit: Rather than picking the median, it's probably more useful to pick a value based on confidence interval. For example, pick the optimal fixed fraction value with a 95% chance of not seeing a 50% drawdown].
Last edited by ksberg on Wed Sep 22, 2004 12:37 pm, edited 1 time in total.
TC
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Thu Jul 08, 2004 2:12 pm
Location: Toronto, Canada

Post by TC »

Kevin

You have adroitly, and with some ingenuity, proved the point I was trying to make !!

Optimal F itself needs some "optimising" before it becomes a useful tool for the average trader :lol:

You have demonstrated in the above posts and elsewhere that your analytical skills far exceed my own and I would be very interested in a simple (remember, I'm a simple guy) exposition of your portfolio optimisation process, within the limits of what you consider proprietary of course.

Using TradeStation I run single-strategy/single market optimisations (max. 8,000 parameter value permutations) and then export to Excel for further analysis.

The optimisation & analysis of systems and markets at the portfolio level and data import capability are the prime reasons I will likely buy VT 2.0.

Thanks

Tom
ksberg
Roundtable Knight
Roundtable Knight
Posts: 208
Joined: Fri Jan 23, 2004 1:39 am
Location: San Diego

The meaning of all this ...

Post by ksberg »

Tom,

I'm unsure whether you were looking for an explanation of the modified Optimal-f algorithm (I'll call this Constrained-F), how Constrained-F gets used in Monte Carlo, or the whole ball of wax.

In a prior post, Ted uploaded a nice graph that compares the bet size fraction to equity growth (his 1st graph). The LHS label reads "Equity Growth", but we would get the same curve using CAGR, $ return, or even TWR. What Optimal-F is doing is walking that curve, testing each fixed fraction point, and finding the point at the top. What the Constrained-F example is doing is also walking the same curve left to right, but it stops somewhere left of the point on top. It stops precisely where we see initial capital decrease by more than 50%. That gives us a more conservative bet size.

Life is good, and we go about trading. Say we repeat the optimization 10 trades later: we would find that our optimal value moved because of the new trade data. Another few trades and it moves again, and so on, and so on. After a while we would question if we should be using an optimal value that keeps moving, because we'd always be trading on past information. Enter Monte Carlo.

Monte Carlo is a technique to randomize probable outcomes based on the future behaving somewhat like the past. At the core, MC asks "What if our trades had occured in a different order?". We could repeat the optimization process on the randomized data, and get a probable optimal value. Record this value. Randomize again, optimize and record. Keep repeating this process hundreds or more times. Graph the recorded values and you will get a statistical distribution, like a bell curve, that represents what we believe to be all probable optimal Constrained-F values.

Finally we use statistics to help pick a point on that curve, which will be our final Constrained-F fixed fraction. Remember that our constraint or "cut off" condition was anything beyond 50% drawdown of initial capital? That implies all optimal values beyond Constrained-F resulted in 50% drawdown or more, so our bell-like curve also closely represents the occurances of seeing 50% drawdown. To cut exposure to 5% chance of seeing that happen, choose a point on the left-hand tail of the distribution which represents 5% or less of all occurances. We now have an optimal value that gives a 95% confidence of keeping initial capital drawdown to less than 50% (according to MC).

My "one more twist" comments add some effort to Constrained-F algorithm, but not as much as you might think: The Constrained-F algorithm needs to be put in a loop. The input values need to be permuted (shuffled). The outputs need to be collected in an array. After the loop, the collection needs to be sorted low-to-high. Calculate 5% as an index into the sorted array. Voila! The value at the index is the answer (at least for this example).

Excel VBA is sufficient for the task. I think the hardest part is a producing a decent shuffle. Mr. Google always has an answer.

Hope that helps,

Kevin

BTW: Optimal-F TWR = Final Stake / Initial Stake ... it's a gain ratio for the portfolio.
Forum Mgmnt
Roundtable Knight
Roundtable Knight
Posts: 1842
Joined: Tue Apr 15, 2003 11:02 am
Contact:

Post by Forum Mgmnt »

even at what many might consider very conservative levels of 1 - 3 % of equity per trade
.

:shock: :shock: :shock:

If 3% is considered conservative, it's no wonder most traders lose money.
TC
Roundtable Knight
Roundtable Knight
Posts: 101
Joined: Thu Jul 08, 2004 2:12 pm
Location: Toronto, Canada

Post by TC »

Forum Mgmnt wrote: If 3% is considered conservative, it's no wonder most traders lose money.

My guess is that a high % of traders have had experience with equities before venturing into futures in search of higher returns.

For a non-margin equities account 3% is a reasonably conservative amount to risk as this would imply a porfolio of ca 30 different stocks. Given the high correlation of all stocks there is little value in increasing the number of equities in a portfolio above this number and many would recommend trading fewer stocks at larger size (traditional buy & hold stock investing). Thus, an investor could have an orthodox equity portfolio of 15-20 stocks, with 5 - 7 % of his equity in each stock.

This same individual then starts trading futures, and recognizing the higher risk, decides to halve the amount of equity in each trade. The result is a "conservative" 3% of equity/trade.

As he rakes in the cash on the first few trades he may be tempted to increase his bet size to where it used to be when investing in equities. In his more thoughful moments this trader may ponder why some of the more experienced traders appear willing to forgo the profits he is making by trading a paltry 1% of equity compared with his 3%+

And then Alan "The Real Hurricane" Greenspan begins his testimony on Capitol Hill .............. :shock:

Of course before Sir Alan has even finished his prepared statement our traders account has taken such a severe beating he'll likely bail at the height of the turmoil and retreat to the safe world of anything-but-futures :cry:
Post Reply