PureBytes Links
Trading Reference Links
|
Hi
Al,
I have
been think about portfolio heat for a bit and am glad that you raise the issue,
You have asserted heat=n*risk, risk the risk for each stock. I am not sure if
this is realistic view.......
for
stock that is perfectly corelated, I think you are correct. On the otherhand,
for stock that are totally un-correlated, then
<FONT face=Arial color=#0000ff
size=2>heat^2=n*risk^2; or heat=sqrt(n)*risk..... Dont ask me to prove it, i
havent been to university for over twenty years, but i am sure someone if the
forum can.
So how
do we deal with stock that are correlated but not perfect....... I've
think a bit, and thats what I've come up with
<FONT face=Arial color=#0000ff
size=2>assuming a stock's risk can be split into two
components
1.
stock specific risk r1
2.
market risk r2
<FONT face=Arial color=#0000ff
size=2>risk=r1+r2;
r1 has
no correlation with the market, and r2 has perfect
correlations
<FONT face=Arial color=#0000ff
size=2>therefore portfolio heat = n*r2+sqrt(n)*r1;
So how
do we find the ratio of r1:r2, I am not sure, but I suggest the
following
find
out sector correlationship with the market, and use that as your ratio, if your
universe is diverse, then may be a 60:40 is a good start........ i am open to
suggestions here......
I've
gone further than that, like someone else to add more to this
theory...
<FONT face=Arial color=#0000ff
size=2>Cheers
Paul
Ho
<FONT face="Franklin Gothic Medium"
size=2>TrustNet
P O Box
212
Ashburton Victoria
3147
<FONT
color=#800000>-<FONT face="Franklin Gothic Medium"
size=2> <A
href=""><FONT face="Franklin Gothic Medium"
size=1>paul.ho@xxxxxxxxxxxxxxx
<FONT
color=#0000ff>(<FONT
face="Franklin Gothic Medium"> <FONT color=#800000
size=1>0400059655
<IMG height=104
src=""
width=110 border=0 NOSEND="1">
"Your Net Security
Partner"
<FONT
face=Tahoma size=2>-----Original Message-----From: Al Venosa
[mailto:advenosa@xxxxxxxxxxxx] Sent: Friday, 6 February 2004 2:30
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
Portfolio position sizing code idea
Hi, all:
Today, I devised a simple money management (MM) code that is applicable
for portfolio trading in regular mode. I am sharing this to solicit any
comments or ideas for improvement or friendly criticism. It is based on Van
Tharp's risk management strategies applied to a portfolio. Here is the simple
code with explanation to follow:
<your buy/sell/short/cover system code here>
n1=Optimize("n1",2,1,3,0.1);n2=Optimize("n2",10,2,20,1);n=n1*n2;PosQty
= n2
SetOption("MaxOpenPositions", posqty); PositionSize =
-n*C/(posqty*stop);
The term "n" is the total portfolio risk or "heat", and posqty is the no.
of positions carried in the portfolio. "n" is composed of 2 variables
multiplied together, n1 and n2. The 'stop' term is used in an ApplyStop
statement as a max stoploss based on points (such as stop = 1.5*ATR(10), as an
example). The n1 variable is the risk in terms of % of equity that we are
willing to encounter PER STOCK. I suggest optimizing it from 1% to 3% in steps
of 0.1. The n2 variable is the no. of positions, which are optimized from
2 to 20 in steps of 1. Now, n2 appears to exist in both the numerator and the
denominator, since the PositionSize statement could just as easily be written:
PositionSize = -n1*n2*C/(n2*stop);
Algebraically, the n2 variables cancel, but in essence they don't. Why?
Because AB interprets a negative term in the positionsize statement as a
percentage of current equity. So, really, AB thinks the product n1*n2,
which is really one term "n" in the first positionsize statement above, is a
percentage of equity. That's why we get different performances when we run the
optimization for each value of n1 and n2. Ok, so where is this all
leading? Well, when you run the optimization as specified above, you get a 3-D
graph with a nicely robust flat peak. In a short-term system I've been
experimenting with lately, I get roughly the same profit results for any value
of n1 between 1.6 and 2.6 and for any posqty (n2) between 6 and 20. If you
pick, say, n1 = 1.7 (as low a risk as possible without giving up much
performance) and n2 = 10, what this means is that we are attempting to make
sure we get at least 5 to 7 positions in our portfolio, each
one risking only 1.7% of our equity. Why only 5 to 7 when we are
specifying 10? Because the stop is based on volatility, and the lower the
volatility, the bigger the positionsize will be. Consequently, you wind up not
having enough capital to take on all 10 positions (assuming you get in at
approximately the same time).
The above strategy differs from the simpler one shown below:
n = Optimize("n",14,2,20,1);
PosQty = Optimize("posqty",6,2,20,1);
SetOption("MaxOpenPositions", posqty); PositionSize =
-n*C/(posqty*stop);
This strategy optimizes in the same system to n = 14 and posqty = 6. This
represents a per-stock risk of 2.3% (i.e., 14/6), which fits nicely within the
1.6 to 2.6 found above for the optimization. However, what happens is that,
with my experimental system, I wind up only taking on about 2 or 3 positions
since all my capital is used up before all 6 positions are filled.
Any thoughts about any of the above? Be nice. It's just experimental.
Thanks, folks.
Regards,
Al Venosa
---Outgoing mail is certified Virus Free.Checked by AVG
anti-virus system (<A
href="">http://www.grisoft.com).Version: 6.0.576
/ Virus Database: 365 - Release Date: 1/30/2004Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|