Optimal f

 Senior Member
 Posts: 30
 Joined: Thu Feb 26, 2004 12:50 pm
 Location: Castlegar, BC, Canada
 Contact:
Industry Standard OptimalF
Hi Neil,
Take a look at ( http://www.seykota.com/tribe/pages/2003_Apr/Apr_2026/) and search the page for â€œIndustry.â€
Take a look at ( http://www.seykota.com/tribe/pages/2003_Apr/Apr_2026/) and search the page for â€œIndustry.â€
Formulas
c.f.
Since this is foremost a discussion around Optimalf, I'll start there. The following code snippets are assembled to represent the discussion at hand. Beware I'm using copy/paste to assemble what otherwise might otherwise be several functions, and the usual caveats apply.
Fractionalf literally replaces optimalF in the above formula with a fractional equivalent. The graph used FractionalF = OptimalF * 0.25.
Here is the "calibration" code for Ryan Jones fixed fraction.
For Kelly, I have the following â€¦
Mea culpa: I found errors in original my Kelly code since I don't often use it (the above code has already been corrected). With that, I'll have to recheck Kelly against Optimalf. I do note that Kelly on straight Turtle comes out to 10% risk ... which crashes the account, of course.
Here is the code for Williams Ratio. Note that it really is straight fixed fraction, only with William's interpretation.
Cheers,
Kevin
Sure. I will say that I generated the graph over a year ago and the bit bucket has claimed some of the details, but the position sizing is clear as a bell.Just for the sake of grounding this discussion which I find hard to follow since we haven't agreed on definitions of either approach or the formulas, would you mind outlining the formulas you used to generate the above graph, what was required as inputs for each bet size type, and where you got those inputs?
Since this is foremost a discussion around Optimalf, I'll start there. The following code snippets are assembled to represent the discussion at hand. Beware I'm using copy/paste to assemble what otherwise might otherwise be several functions, and the usual caveats apply.
Code: Select all
int i;
double hpr = 0;
double twr = 0;
double twr2 = 0;
double f2 = 0;
double sum = 0;
int len = trxns.length;
_length = len;
for(i=0;i<len;i++)
sum += trxns[i];
if (sum < 0) return 0;
double ll = trxns[0];
for(i=0;i<len;i++) {
ll = Math.min(ll, trxns[i]);
}
_absLargestLoss = (_absLargestLoss > 0.0) ? Math.max(ll, _absLargestLoss) : Math.max(ll, 1);
double f;
for(int ifrac=1;ifrac<1000;ifrac++) {
f = ((double)ifrac)/1000.0;
twr = 1;
for(i=0;i<len;i++) {
hpr = 1 + (f * (trxns[i]/_absLargestLoss));
twr = twr*hpr;
}
if (twr < twr2) {
_optimalF = f2;
_terminalWealthRelative = twr2;
return _optimalF;
}
twr2 = twr;
f2 = f;
}
_optimalF = f2;
_terminalWealthRelative = twr2;
minCapital = _absLargestLoss/_optimalF;
// optimalf sizing formula ***
double optimalFDollar = _absLargestLoss/_optimalF;
int contracts = (int)(equity / optimalFDollar);
Here is the "calibration" code for Ryan Jones fixed fraction.
Code: Select all
double ll = trxns[0];
for(int i=0; i<trxns.length; i++) {
ll = Math.min(ll, trxns[i]);
}
_absLargestLoss = (_absLargestLoss > 0.0) ? Math.max(ll, _absLargestLoss) : Math.max(ll, 1);
double tmpdelta = _absLargestLoss / 2.0;
if (tmpdelta > _delta) _delta = tmpdelta;
_minCapital = Math.max(_minCapital, (_absLargestLoss + _minIncr) * 4.0);
int nc = 1;
double delta = getDelta();
double equityLevel = _minCapital;
for(nc=1; nc<_maxAlloc; nc++) {
equityLevel += ((double)nc)*delta;
if (equity < equityLevel) return nc;
}
int contracts = nc;
Code: Select all
double value = 0.0;
double tWins = 0.0;
double tLoss = 0.0;
int wins = 0;
int losses = 0;
for(int i=0; i<trxns.length; i++) {
value += trxns[i];
if (value > 0.0) {
wins++;
tWins += value;
} else {
losses++;
tLoss += value;
}
}
_pcntWin = ((double)wins)/((double)trxns.length);
double aw = (wins > 0) ? tWins / wins : 0.0;
double al = (losses > 0) ? Math.abs(tLoss) / losses : 0.0;
_winLossRatio = (al > 0.0) ? aw/al : 0.0;
_acctPcntRisk = ((_winLossRatio+1)*_pcntWin  1) / _winLossRatio;
int contracts = (equity * _acctPctRisk) / risk;
Here is the code for Williams Ratio. Note that it really is straight fixed fraction, only with William's interpretation.
Code: Select all
int contracts = (equity * _acctPcntRisk) / _absLargestLoss;
Kevin
Input Series
Almost forgot to state a basic assumption: the input trade series used to callibrate any sizing method must be a single, constant contract for each trade.
Cheers,
Kevin
Cheers,
Kevin

 Roundtable Knight
 Posts: 1842
 Joined: Tue Apr 15, 2003 11:02 am
 Contact:
In my opinion, you are playing with serious fire if you trade even 80% of optimal f. Optimal f or even 80% thereof assumes you have a good picture of what the population of possible trades looks like. This seems to be a dubious foundation upon which to build your wealth.
Consider the following. I was just this evening testing a system that had excellent returns and a MAR of about 2.8. You could have easily traded this at 8% to 10% over the last 10 years.
Move to a 20 year test and you go bust with that level of trading. Do you know why?
ONE BAD DAY
At 1.2% bet size for this system you end up with a 25% single day hit. This single day accounts for the worse drawdown in the simulation by a factor of 2:1. What do you think 8% bet size does to you? How many would have seen this coming on the 19th?
Do you really think we won't see a worse hit than this at some point? There are plenty of scenarios I can envision that would cause a worse shock than this.
This drawdown and price shock came while the system was one day and about 1% off contract highs, what if it had happened while the system was already in a 10% drawdown?
Consider the following. I was just this evening testing a system that had excellent returns and a MAR of about 2.8. You could have easily traded this at 8% to 10% over the last 10 years.
Move to a 20 year test and you go bust with that level of trading. Do you know why?
ONE BAD DAY
At 1.2% bet size for this system you end up with a 25% single day hit. This single day accounts for the worse drawdown in the simulation by a factor of 2:1. What do you think 8% bet size does to you? How many would have seen this coming on the 19th?
Do you really think we won't see a worse hit than this at some point? There are plenty of scenarios I can envision that would cause a worse shock than this.
This drawdown and price shock came while the system was one day and about 1% off contract highs, what if it had happened while the system was already in a 10% drawdown?
 Attachments

 BadDay.png (11.1 KiB) Viewed 21818 times

 Roundtable Knight
 Posts: 1842
 Joined: Tue Apr 15, 2003 11:02 am
 Contact:
Turtle and Optimalf
Forum Mgmnt,
Regarding Optimalf and Turtle ...
I also double checked how Vince recommends treating Optimalf and portfolios. There are actually several treatments, but it always boils down to using Fractionalf in some fashion to form an aggregate optimal value for the portfolio. In those situations, you're always at a small fraction of Optinalf until fully loaded. So, Neil, you're intuition is justified.
If we actually see 24% allocation in Turtle, and OptimalF for the portfolio is between 2843%, that infers that Turtle really trades somewhere between 5586% Optimalf when fully loaded. Forum Mgmnt, you may be Trading 80% Optimalf without realizing it.
I'd like to point out one very important consideration: Turtle rules use the market action to prove out position and sizing. Look at the scaling rules, correlation rules, direction rules, even lasttradeprofitable rule; these all effect total allocation. I believe that is different than applying Optimalf directly as suggested in Vince's books, even though we end up at similar levels. What I've found suggests that HOW you go about sizing can be just as important to the sizing algorithms itself, and Turtle rules are a great example.
Ok.
Let me suggest that the value of Optimalf IS NOT for position sizing, at least directly.
Optimalf can be used as a guideline for total portfolio heat, with some Fractionalf forming a "do not exceed" line. We see a bit of this already when looking at fullyloaded Turtle. I would look for StdDev of optimalf line, then take several StdDev's down from f value as maximum risk. Or, maybe some rule of thumb, like 75% works well. TBD.
Optimalf can be used as a metric of system worthiness, because you'll find the smoother and more accurate the system, the higher the value of f. This makes intuitive sense because it's precisely these systems that can stand higher bet sizes. So, as a measure, I'll offer it up along with MAR, Sharpe ratio, etc. Optimalf is about finding optimal geometric growth. Sounds like a great measure (one among many). Check it out and decide for yourself.
In summary:
Kevin
I agree 100% (except per the caveat below). Let me state straight up that I don't recommend anyone trade directly on Optimalf. I believe it's an important concept to understand, especially since many people are eager to trade Kelly, which can be even worse than Optimalf (as the prior example shows).In my opinion, you are playing with serious fire if you trade even 80% of optimal f. Optimal f or even 80% thereof assumes you have a good picture of what the population of possible trades looks like. This seems to be a dubious foundation upon which to build your wealth.
Regarding Optimalf and Turtle ...
Neil, although I responded with corrections for the Turtle correlation and direction rules, your statement got me thinking a bit. So I ran the Optimalf calculation on a couple Turtle test portfolios covering the prior 10 years. That is, I fed the entire series of portfolio trades into the optimalf calibration vs. each of the single markets. I found Optimalf value for the portfolio was between 28% to 43%, depending on portfolio make up and rule variation. So, maybe you're not far off the mark.Dare I say it but is this why turtle systems make so much money?
I also double checked how Vince recommends treating Optimalf and portfolios. There are actually several treatments, but it always boils down to using Fractionalf in some fashion to form an aggregate optimal value for the portfolio. In those situations, you're always at a small fraction of Optinalf until fully loaded. So, Neil, you're intuition is justified.
If we actually see 24% allocation in Turtle, and OptimalF for the portfolio is between 2843%, that infers that Turtle really trades somewhere between 5586% Optimalf when fully loaded. Forum Mgmnt, you may be Trading 80% Optimalf without realizing it.
I'd like to point out one very important consideration: Turtle rules use the market action to prove out position and sizing. Look at the scaling rules, correlation rules, direction rules, even lasttradeprofitable rule; these all effect total allocation. I believe that is different than applying Optimalf directly as suggested in Vince's books, even though we end up at similar levels. What I've found suggests that HOW you go about sizing can be just as important to the sizing algorithms itself, and Turtle rules are a great example.
Ok.
Let me suggest that the value of Optimalf IS NOT for position sizing, at least directly.
Optimalf can be used as a guideline for total portfolio heat, with some Fractionalf forming a "do not exceed" line. We see a bit of this already when looking at fullyloaded Turtle. I would look for StdDev of optimalf line, then take several StdDev's down from f value as maximum risk. Or, maybe some rule of thumb, like 75% works well. TBD.
Optimalf can be used as a metric of system worthiness, because you'll find the smoother and more accurate the system, the higher the value of f. This makes intuitive sense because it's precisely these systems that can stand higher bet sizes. So, as a measure, I'll offer it up along with MAR, Sharpe ratio, etc. Optimalf is about finding optimal geometric growth. Sounds like a great measure (one among many). Check it out and decide for yourself.
In summary:
 I do not trade using Optimalf sizing.
I do not recommed using Optimalf for sizing.
I recommend people fully understand any sizing method before applying it. This includes doing extensive backtesting over many different situations, including price shocks as c.f. mentioned.
Optimalf is not a boogey man, and is extremely useful to understand.
PLEASE understand Kelly in relation to Optimalf ... what you don't understand may kill you! (refer to #3)
Kevin

 Roundtable Knight
 Posts: 1842
 Joined: Tue Apr 15, 2003 11:02 am
 Contact:
Kevin,
First, I strongly agree with Mark Johnson and others who say the concept of Optimal f is valuable if it gets people to look at the curve of TWR versus Bet Size.
However, optimal f itself is a moving target and at best an approximation since it depends too much on your particular test results.
Second, my real issue is that a trader should address the reason that he doesn't want to swallow the Optimal f pill whole.
Risk of Ruin  whether this is reaching some investor related threshold, one's personal psychological limits, or actually losing all the money.
Ed Seykota used to talk all about the Kelly Formula but never traded anywhere near that size because of quess what: Risk of Ruin.
If Going Bust is what you really care about, then use an estimation of Risk of Ruin as the basis of bet sizing, at least then you're time will be spent looking at those risks that collectively contribute to risk of ruin.
Otherwise, how do you know if 80% of your particular optimal f doesn't have virtually the same Risk of Ruin risk as the 100% optimal f point?
I've got a paper I wrote a few years ago that looks at this issue and the Return versus Bet Size curve a bit more closely. I'll try to update it, dust it off, and post it in our library.
 Forum Mgmnt
P.S. I don't recall ever having a fully loaded position with 24 units. I think the most I ever had on was about 17 or 18 units. At these points, the total portfolio heat was generally very low on an entry risk perspective since most of your stops would be profitable during an extended run.
First, I strongly agree with Mark Johnson and others who say the concept of Optimal f is valuable if it gets people to look at the curve of TWR versus Bet Size.
However, optimal f itself is a moving target and at best an approximation since it depends too much on your particular test results.
Second, my real issue is that a trader should address the reason that he doesn't want to swallow the Optimal f pill whole.
Risk of Ruin  whether this is reaching some investor related threshold, one's personal psychological limits, or actually losing all the money.
Ed Seykota used to talk all about the Kelly Formula but never traded anywhere near that size because of quess what: Risk of Ruin.
If Going Bust is what you really care about, then use an estimation of Risk of Ruin as the basis of bet sizing, at least then you're time will be spent looking at those risks that collectively contribute to risk of ruin.
Otherwise, how do you know if 80% of your particular optimal f doesn't have virtually the same Risk of Ruin risk as the 100% optimal f point?
I've got a paper I wrote a few years ago that looks at this issue and the Return versus Bet Size curve a bit more closely. I'll try to update it, dust it off, and post it in our library.
 Forum Mgmnt
P.S. I don't recall ever having a fully loaded position with 24 units. I think the most I ever had on was about 17 or 18 units. At these points, the total portfolio heat was generally very low on an entry risk perspective since most of your stops would be profitable during an extended run.
Risk of Ruin, Optimalf
Forum Mgmnt,
I'd be interested in seeing the paper, if and when you get around to it.
One reason I'm interested in your paper is that Ralph discusses RiskofRuin, and goes on to show how it's integral to bet size. Actually, I think his premise is the two things are different sides of the same coin, sotospeak.
We may be in violent agreement, really saying the same thing: Never trade at Optimalf (swallow the whole Optimalf pill), and ensure you look at downside risk when considering bet size. I use MC confidence interval testing vs Riskofruin, a different approach to the same topic.
Also, thanks for insight into total unit heat. I don't have that data from my personal Turtle trading, and I've traded smaller basket size (1012 markets), which wouldn't see those kind of levels.
Kevin
I'd be interested in seeing the paper, if and when you get around to it.
One reason I'm interested in your paper is that Ralph discusses RiskofRuin, and goes on to show how it's integral to bet size. Actually, I think his premise is the two things are different sides of the same coin, sotospeak.
We may be in violent agreement, really saying the same thing: Never trade at Optimalf (swallow the whole Optimalf pill), and ensure you look at downside risk when considering bet size. I use MC confidence interval testing vs Riskofruin, a different approach to the same topic.
Also, thanks for insight into total unit heat. I don't have that data from my personal Turtle trading, and I've traded smaller basket size (1012 markets), which wouldn't see those kind of levels.
Kevin
Bernouilli distribution
Thanks for the links Kianti.
Interesting to note how the presenters jump right over the Bernouilli assumption and apply it directly to trading. Maybe their style always result in an equal amount of money won or lost on every trade!
One thing that makes Vince an interesting study is that he actually corrects this assumption and applies the appropriate mathematics. It turns out to make a significant difference. Then again, maybe that's a distinction only math geeks can appreciate.
Cheers,
Kevin
Interesting to note how the presenters jump right over the Bernouilli assumption and apply it directly to trading. Maybe their style always result in an equal amount of money won or lost on every trade!
One thing that makes Vince an interesting study is that he actually corrects this assumption and applies the appropriate mathematics. It turns out to make a significant difference. Then again, maybe that's a distinction only math geeks can appreciate.
Cheers,
Kevin

 Roundtable Knight
 Posts: 1842
 Joined: Tue Apr 15, 2003 11:02 am
 Contact:

 Senior Member
 Posts: 30
 Joined: Thu Feb 26, 2004 12:50 pm
 Location: Castlegar, BC, Canada
 Contact:
Scatter Plot
Thanks for the pointer on the images c.f..
>> If you save the image as a .jpg, .gif, or .png it will draw in the post since the bulletin board software knows that the browser can display them natively.
How does one display tables?
The scatter plot I have attached may have some merit though it is specific to trading stocks. The idea it represents may be extrapolated to futures. The chart shows that for very small Kelly fractions (left) transaction costs over run the returns. As we proceed to the right, increasing the Kelly fraction, the variance on the returns also increases.
Lawrence
>> If you save the image as a .jpg, .gif, or .png it will draw in the post since the bulletin board software knows that the browser can display them natively.
How does one display tables?
The scatter plot I have attached may have some merit though it is specific to trading stocks. The idea it represents may be extrapolated to futures. The chart shows that for very small Kelly fractions (left) transaction costs over run the returns. As we proceed to the right, increasing the Kelly fraction, the variance on the returns also increases.
Lawrence
 Attachments

 1Kelly.png (12 KiB) Viewed 21861 times

 Roundtable Knight
 Posts: 1842
 Joined: Tue Apr 15, 2003 11:02 am
 Contact:
Neil,
If you have HTML turned on you can use HTML table statements to produce a nice table:
<TABLE><TR><TD width=150>HTML Element</TD><TD>What it does</TD></TR>
<TR><TD>TABLE</TD><TD>Defines a new table</TD></TR>
<TR><TD>TR</TD><TD>Defines a table row</TD></TR>
<TR><TD>TD</TD><TD>Defines a table element</TD></TR></TABLE>
Look at any HTML tutorial for more details.
 Forum Mgmnt
If you have HTML turned on you can use HTML table statements to produce a nice table:
<TABLE><TR><TD width=150>HTML Element</TD><TD>What it does</TD></TR>
<TR><TD>TABLE</TD><TD>Defines a new table</TD></TR>
<TR><TD>TR</TD><TD>Defines a table row</TD></TR>
<TR><TD>TD</TD><TD>Defines a table element</TD></TR></TABLE>
Look at any HTML tutorial for more details.
 Forum Mgmnt

 Roundtable Knight
 Posts: 1842
 Joined: Tue Apr 15, 2003 11:02 am
 Contact:
Here's the code.
NOTE: I have HTML disabled in this post so the above code doesn't do any formatting.
 Forum Mgmnt
Code: Select all
<TABLE><TR><TD width=150>[b]HTML Element[/b]</TD><TD>[b]What it does[/b]</TD></TR>
<TR><TD>TABLE</TD><TD>Defines a new table</TD></TR>
<TR><TD>TR</TD><TD>Defines a table row</TD></TR>
<TR><TD>TD</TD><TD>Defines a table element</TD></TR></TABLE>
 Forum Mgmnt
Hi to all of you.
I`m new to the forums, so first of all, my name is Daniel and I trade in Chilean markets. As you will notice, I`m pretty much a newbie, but as allways, it is a pleasure to participate in interesting debates.
I`ve read Ralph Vince`s "The Mathematics of Money Management" and I`ve done an Excel Spreadsheet to calculate optimal F. In the next lines I will comment about what i`ve understood, and please correct me if any errors arise.
In his book Ralph states that you turn F into a dollar amount dividing the biggest loss by (f), so you can have for example a result like "1 Unit per 28.794,00"
Now suppose my total money is 400.000,00 so I have (400.000/28.794) 13,89 Units.
So, i could for example invest in 13 diferent contracts *or* choose to invest in 2 contracts of 4,445 units per contract ($127.989 each) and one contract of 5 units ($143970) , thus completing 13,89 units... is this a correct thought?
Now, suppose I complete the first trade with a 30.000 profit, so now i would have a new potencial unit to invest, but this would not be true since i would have to calculate a new optimal f and only then calculate the new unit amount, is this correct?
I know that investing 4 or 5 units per contract maybe is not optimal, but I`m not talking about dollars, but Chilean $Pesos. 1 Dollar is about $580 pesos, so my total money is a very small amount in dollars, and I can`t invest on one unit per contract, because my profits would be *too* small and comissions would also eat my profits for breakfast.
Also my personal data is not enough yet. I have completed (today) my first trade in CTCA (TelefÃ³nica CTC Chile Company: phone, internet, etc) with an unexpected result: $8252.
*****
As a story: This loss was a result of an official government answer in late night Friday to Telefonica`s fixed prices aspirations for the next 5 years. The Government decided to lower almost every price Telefonica wanted to rise. On Friday, Telefonica`s Price was at 2350, and today price fell to 1990. I sold at 2048, my stop loss was at 2050.
If you want to se a graphic, follow this link:
http://img.villagephotos.com/p/200310/422834/CTCA.gif
*****
I`ll read your comments and hopefully we`ll have a good talk.
From Chile, to the World, Daniel. bye
I`m new to the forums, so first of all, my name is Daniel and I trade in Chilean markets. As you will notice, I`m pretty much a newbie, but as allways, it is a pleasure to participate in interesting debates.
I`ve read Ralph Vince`s "The Mathematics of Money Management" and I`ve done an Excel Spreadsheet to calculate optimal F. In the next lines I will comment about what i`ve understood, and please correct me if any errors arise.
In his book Ralph states that you turn F into a dollar amount dividing the biggest loss by (f), so you can have for example a result like "1 Unit per 28.794,00"
Now suppose my total money is 400.000,00 so I have (400.000/28.794) 13,89 Units.
So, i could for example invest in 13 diferent contracts *or* choose to invest in 2 contracts of 4,445 units per contract ($127.989 each) and one contract of 5 units ($143970) , thus completing 13,89 units... is this a correct thought?
Now, suppose I complete the first trade with a 30.000 profit, so now i would have a new potencial unit to invest, but this would not be true since i would have to calculate a new optimal f and only then calculate the new unit amount, is this correct?
I know that investing 4 or 5 units per contract maybe is not optimal, but I`m not talking about dollars, but Chilean $Pesos. 1 Dollar is about $580 pesos, so my total money is a very small amount in dollars, and I can`t invest on one unit per contract, because my profits would be *too* small and comissions would also eat my profits for breakfast.
Also my personal data is not enough yet. I have completed (today) my first trade in CTCA (TelefÃ³nica CTC Chile Company: phone, internet, etc) with an unexpected result: $8252.
*****
As a story: This loss was a result of an official government answer in late night Friday to Telefonica`s fixed prices aspirations for the next 5 years. The Government decided to lower almost every price Telefonica wanted to rise. On Friday, Telefonica`s Price was at 2350, and today price fell to 1990. I sold at 2048, my stop loss was at 2050.
If you want to se a graphic, follow this link:
http://img.villagephotos.com/p/200310/422834/CTCA.gif
*****
I`ll read your comments and hopefully we`ll have a good talk.
From Chile, to the World, Daniel. bye
Danger Will Robinson
Welcome Daniel!dquepal wrote:I`m new to the forums, so first of all, my name is Daniel and I trade in Chilean markets. As you will notice, I`m pretty much a newbie, but as allways, it is a pleasure to participate in interesting debates.
I hope you don't take this wrong, but you introduced yourself as a newbie, and yet ask about Optimalf, so I feel it's like you are asking to buy bullets for your gun. I hope you're don't intend to trade at Optimalf levels, and that you know that trading at those sizes can be extremely dangerous.
You're first interpretation of Dollar F is correct.
Code: Select all
#contracts = equity / Dollar_F
Code: Select all
contractsOnMarket[1] = equity / (absLL[1] / (33% * f[1]))
contractsOnMarket[2] = equity / (absLL[2] / (33% * f[2]))
contractsOnMarket[3] = equity / (absLL[3] / (34% * f[3]))
33% + 33% + 34% = 100%
f[i] == optimalf on market[i]
absLL[i] == absolute largest loss on market[i]
There were earlier posts on this thread about how close a fully loaded Turtle system might trade in comparison to Optimalf. Those calculations were done on a portfoliowide basis as a comparison estimate. It does not represent how one goes about applying Optimalf to a portfolio. I appologize if I caused any confusion.
Cheers,
Kevin
Thanks for you reply ksberg.
About what you say, what do you mean exactly when you say "your second interpretation". Is that to use fractional units to apply position sizing (ie 4,445)? or is it adding 2 or more units in the same contract?
I want to clarify something, since this is not my mother language, and I have not studied economy or market issues in a formal way (in a University for example).
I consider a contract to be the action of buying some shares, for example 1000 shares of IBM. That would be one contract to me. Also a Market would be the Dow Jones, IBEX (Spain), or IPSA (Chile).
With that clarified, and since I only trade one market, the IPSA, i dont get the idea when you say, and i quote:
"The second interpretation mixes different markets, which is usually not correct, unless your Optimalf is derived from the entire portfolio."
And yes, the calculation of optimal f is derived from the entire portfolio, and that includes every trade i make, including all *contracts* in the *market*.
I agree with Ralph Vince when he says that for every rule you create, every optimization lower your system degrees of freedom. I don`t use any technical rule system, or use any technical indicator. I dont do backtesting either. Anyway, I dont discard the possibility that some particular system maybe usefull in some particular market. I respect other people systems though, since this is just my personal aproach. I`m planning to trade at optimal F levels. Trust me, i will come back a tell my story, good or bad.
Also I dont see why my approach would yield a higher fake optimal F, since optimal F says nothing about how to distribute your units. I consider the general idea to be, "Make one bet for every x dollars in your account", but I dont consider to be conditional that all bets should be in diferent contracts.
As I said before, I`m very pleased to have found this forum, and I`m here to stay.
About what you say, what do you mean exactly when you say "your second interpretation". Is that to use fractional units to apply position sizing (ie 4,445)? or is it adding 2 or more units in the same contract?
I want to clarify something, since this is not my mother language, and I have not studied economy or market issues in a formal way (in a University for example).
I consider a contract to be the action of buying some shares, for example 1000 shares of IBM. That would be one contract to me. Also a Market would be the Dow Jones, IBEX (Spain), or IPSA (Chile).
With that clarified, and since I only trade one market, the IPSA, i dont get the idea when you say, and i quote:
"The second interpretation mixes different markets, which is usually not correct, unless your Optimalf is derived from the entire portfolio."
And yes, the calculation of optimal f is derived from the entire portfolio, and that includes every trade i make, including all *contracts* in the *market*.
I agree with Ralph Vince when he says that for every rule you create, every optimization lower your system degrees of freedom. I don`t use any technical rule system, or use any technical indicator. I dont do backtesting either. Anyway, I dont discard the possibility that some particular system maybe usefull in some particular market. I respect other people systems though, since this is just my personal aproach. I`m planning to trade at optimal F levels. Trust me, i will come back a tell my story, good or bad.
Also I dont see why my approach would yield a higher fake optimal F, since optimal F says nothing about how to distribute your units. I consider the general idea to be, "Make one bet for every x dollars in your account", but I dont consider to be conditional that all bets should be in diferent contracts.
As I said before, I`m very pleased to have found this forum, and I`m here to stay.
Clarifications
Daniel,
I do not trade stocks with Optimalf, so perhaps someone else can better answer that question. I do see that Ralph discusses stocks separately in his followon books (Mathematics of Money Management, and The New Money Management). At one point he refers to treating a 100share lot as "one contract", perhaps this is to ensure trading round lots.
I think most importantly for stocks, you must modify how you include margin in the Optimalf portfolio equation.
This formula essentially curbs Optimalf to a fraction of the optimal value, letting you trade fully margined. For stocks, margin$ becomes margin_rate*purchase_cost. By the way, in all these examples, Ralph uses values of f calculated one per market, not per portfolio. So, you would have one optimal f value for IBM on you system, another for ADBE, another for MSFT, etc. Then you assemble the aggregate using the above formula.
Daniel, I'm a systems trader, so I approach things differently than a discretionary trader. I get extremely concerned when I hear you trade without systematic rules, indicators, or back testing ... and yet want to trade using Optimalf. How do you know what to expect?
Before trading with any position sizing algorithm, I highly recommend gaining a solid understanding of how size can adversely affect your account. THE WRONG SIZE CAN EASILY CRASH THE ACCOUNT TO ZERO! In practice, this can actually happen with values less than Optimalf (!).
You really are talking about puting bullets in the gun.
There are several Monte Carlo programs that might help see sizing expectations. Perhaps someone can suggest their experiences. Here's a listing of several: http://unicorn.us.com/trading/competition.html
If you know your individual trade reward/risk ratios, I could assist with a spreadsheet that lets you see different sizing outcomes. Sizing is an area that is often counterintuitive: bigger isn't always better, and it's difficult to tell where size starts working against you unless you do some sort of backtesting or simulation.
I appreciate Ralph Vince's body of work, but I believe it must be applied carefully and responsibly.
Please don't take offense, but I hope you consider these suggestions before using Optimalf.
Cheers,
Kevin
By second interpretation, I mean how you are selecting 2 units of one thing, then 5 of another to complete your 13.89 units. By market, I mean one security, future, etc ... just a single thing identified by a unique symbol (e.g. JY is one market, IBM is one market).So, i could for example invest in 13 diferent contracts *or* choose to invest in 2 contracts of 4,445 units per contract ($127.989 each) and one contract of 5 units ($143970) , thus completing 13,89 units... is this a correct thought?
I do not trade stocks with Optimalf, so perhaps someone else can better answer that question. I do see that Ralph discusses stocks separately in his followon books (Mathematics of Money Management, and The New Money Management). At one point he refers to treating a 100share lot as "one contract", perhaps this is to ensure trading round lots.
I think most importantly for stocks, you must modify how you include margin in the Optimalf portfolio equation.
Code: Select all
page 321, Mathematics of Money Management ...
U = Sum( f$[i] ) / (Sum ( margin$[i] ) * N ) for i = 1 .. N
U == upside fraction of f; trading the Fractionalf as aggressively as possible without incurring a margin call
f$[i] == optimal f in dollars for ith market:system
margin$[i] == margin requirement for ith market:system
N == total number of market:systems in portfolio
Daniel, I'm a systems trader, so I approach things differently than a discretionary trader. I get extremely concerned when I hear you trade without systematic rules, indicators, or back testing ... and yet want to trade using Optimalf. How do you know what to expect?
Before trading with any position sizing algorithm, I highly recommend gaining a solid understanding of how size can adversely affect your account. THE WRONG SIZE CAN EASILY CRASH THE ACCOUNT TO ZERO! In practice, this can actually happen with values less than Optimalf (!).
You really are talking about puting bullets in the gun.
There are several Monte Carlo programs that might help see sizing expectations. Perhaps someone can suggest their experiences. Here's a listing of several: http://unicorn.us.com/trading/competition.html
If you know your individual trade reward/risk ratios, I could assist with a spreadsheet that lets you see different sizing outcomes. Sizing is an area that is often counterintuitive: bigger isn't always better, and it's difficult to tell where size starts working against you unless you do some sort of backtesting or simulation.
I appreciate Ralph Vince's body of work, but I believe it must be applied carefully and responsibly.
Please don't take offense, but I hope you consider these suggestions before using Optimalf.
Cheers,
Kevin
Thank you for your reply Kevin, I reread some of the books chapters and have found what I think is useful information. I appreciate your concerns about my trading system, and in future conversations I will explain its basic approach.
I have found a trading glossary web and Iâ€™ve searched for some definitions, so now I will use proper concepts. (www.tradingglossary.com).
In Vinceâ€™s book he differentiates Market from Market systems. One Market would be for example treasury bonds, and a Market system refers to the trading approach for that given Market, for example a moving average. Then, he states that you should yield the optimal quantities for each separated Market system. So the HPR you calculate are different for different trading approach, or Market systems. Since I use only one trading approach, and I donâ€™t trade if the security does not behave as my particular approach dictates, there is no apparent reason for calculating different HPR for every security in my personal universe of security trades, thus calculating only one optimal f for all trades. If in the future I encounter an additional Market system, now I know I should yield more than one optimal f, and I thank you for that information, since I didnâ€™t have a clue of that.
Vince says that if you are trading Futures (I'm not) you may decide to have one Unit as one minicontract, and if optimal f dictates to trade 9 units, it would be equal to trade 4 contracts and one minicontract. I find this very similar to my approach of dividing your total equity with the amount optimal f dictates as one unit per those particular X dollars that divides f. In this particular case, one Unit would be defined as a dynamic quantity, that would depend directly in the optimal f you calculate and your total equity.
Now, maybe you shouldnâ€™t break out one Unit into smaller pieces as I did in my previous example (4,445 Units per security), but then trading minicontracts in Future markets would not be possible. I think it depends on how you define Units, and since you are free to define them, I donâ€™t see any practical reason for not doing so.
Kevin, you talked about margin. In my particular case, I donâ€™t have any margin that I'm aware of. I think I'm positive about that. I was reading some info about that in the book and it said that in this particular case, optimal weights and optimal quantity would be the same. I donâ€™t know what optimal weights are, though. I will read about that.
Thanks for your usefull information.
I have found a trading glossary web and Iâ€™ve searched for some definitions, so now I will use proper concepts. (www.tradingglossary.com).
In Vinceâ€™s book he differentiates Market from Market systems. One Market would be for example treasury bonds, and a Market system refers to the trading approach for that given Market, for example a moving average. Then, he states that you should yield the optimal quantities for each separated Market system. So the HPR you calculate are different for different trading approach, or Market systems. Since I use only one trading approach, and I donâ€™t trade if the security does not behave as my particular approach dictates, there is no apparent reason for calculating different HPR for every security in my personal universe of security trades, thus calculating only one optimal f for all trades. If in the future I encounter an additional Market system, now I know I should yield more than one optimal f, and I thank you for that information, since I didnâ€™t have a clue of that.
Vince says that if you are trading Futures (I'm not) you may decide to have one Unit as one minicontract, and if optimal f dictates to trade 9 units, it would be equal to trade 4 contracts and one minicontract. I find this very similar to my approach of dividing your total equity with the amount optimal f dictates as one unit per those particular X dollars that divides f. In this particular case, one Unit would be defined as a dynamic quantity, that would depend directly in the optimal f you calculate and your total equity.
Now, maybe you shouldnâ€™t break out one Unit into smaller pieces as I did in my previous example (4,445 Units per security), but then trading minicontracts in Future markets would not be possible. I think it depends on how you define Units, and since you are free to define them, I donâ€™t see any practical reason for not doing so.
Kevin, you talked about margin. In my particular case, I donâ€™t have any margin that I'm aware of. I think I'm positive about that. I was reading some info about that in the book and it said that in this particular case, optimal weights and optimal quantity would be the same. I donâ€™t know what optimal weights are, though. I will read about that.
Thanks for your usefull information.
Mini contracts, market systems
Mini contracts are actual futures contracts that trade at smaller levels of commitment. For instance, S&P mini (emini) is 1/5 the size of a full contract. My recollection is that this is what he refers to when doing this kind of unit split. For example, if sizing called for 2.2 units of SP, we could allocate 2 SP and 1 ES. In that example, SP and ES are (roughly) the same market.
I'll have to consider what you've said about market system. I've always treated this as "market:system", meaning a market to system pairing. I suppose it is possible to treat a "moving average" system as one thing across a number of symbols. My experience is that Optimalf can vary widely per market:system pairs. Heck, Optimalf will vary enough even within a market:system pair!
I tend to believe that not distinguishing by market (symbol) introduces more variation in results. What leads me to say this is that markets (i.e. unique symbols) trade differently. Some are volitile, some are smooth, some trend well, some are sporadic (and they may change over time). Using one optimalf value for all of these conditions is similar in spirit to assigning a fixed stop amount to different markets. Yes, it can certainly be done, but expect your results to vary widely.
Cheers,
Kevin
I'll have to consider what you've said about market system. I've always treated this as "market:system", meaning a market to system pairing. I suppose it is possible to treat a "moving average" system as one thing across a number of symbols. My experience is that Optimalf can vary widely per market:system pairs. Heck, Optimalf will vary enough even within a market:system pair!
I tend to believe that not distinguishing by market (symbol) introduces more variation in results. What leads me to say this is that markets (i.e. unique symbols) trade differently. Some are volitile, some are smooth, some trend well, some are sporadic (and they may change over time). Using one optimalf value for all of these conditions is similar in spirit to assigning a fixed stop amount to different markets. Yes, it can certainly be done, but expect your results to vary widely.
Cheers,
Kevin