[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Create composite from average change



PureBytes Links

Trading Reference Links

All -

I'm not sure exactly what Graham was after either, but you've touched 
on something I've been meaning to share (and its a lazy Sunday 
morning).  The reason that you might want what Graham 
entitled "average change" is to create a normalized portfolio equity 
line or an equal weighted average.

ATC of prices to get an average price is mostly OK for indices or 
large families.  It is, in effect, a price weighted average.  It can 
distort the average of a smaller portfolio.  In a simple portfolio, 
you might invest equal amounts and periodically rebalance the 
investment.  If the prices vary widely, ATC of prices/count distorts 
the picture.  Reconstituting an equity line from a daily average of 
gains is a decent approximation of a less frequent rebalance and is 
easy to do.

BTW, it is sometimes useful to look at the unweighted, rebalanced 
average of cap-weighted indexes and sectors.  

Bruce

P.S. If this is what you are after and you want it, I'll post 
a program to do this in the files section.


--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Graham,
> I think I understand what you are after. Why would you want to sum 
(cum) all
> the changes for each stock? If you are looking to see what the 
change in
> momentum is perhaps a simple ROC of the close over a given period 
would
> offer you more in your composite?
> 
> Next you are using the foreign call for ~index to view the 
composite data
> versus an individual stock, is  this correct? Are you trying to 
overlay
> ~index onto your stock price chart? Are you using styleownscale for 
your
> ~index plot?
> 
> Perhaps I am not understanding your challenge. As they say a 
picture is
> worth a thousand words......
> 
> Regards,
> Jayson
> -----Original Message-----
> From: Graham [mailto:gkavanagh@x...]
> Sent: Sunday, August 24, 2003 9:32 AM
> To: AB yahoo group
> Subject: [amibroker] Create composite from average change
> 
> 
> I am wanting to create a composite of a group of tickers by adding 
the
> change of the price day to day
> I have tried it the simple way of just
> Addtocomposite(c-ref(c,-1), "~index", "C");
> etc for OHLC
> Addtocomposite(1, "~index", "I");
> 
> Then to create the chart by just using Foreign function then Cum(C)
> But I found the resulting chart changed too much when I viewed it 
from each
> stock on the list due to, I guess, the starting point varying 
according to
> the base ticker I am viewing from
> 
> What I think I need to do is create a composite, then read in the 
values
> from this composite to create a second composite which has definite 
arrays
> that require no further modification to plot
> But I am not certain how to do this in a single scan
> A simplified procedure below, but I am not sure how to get it to 
work
> 
> Addtocomposite(c-ref(c,-1), "~base", "C");
> -? - what can I do here ?
> newC = Foreign("~base","c")
> myC = cum(newC)
> Addtocomposite(myC,"~index","C") etc
> 
> 
> Any suggestions appreciated, or reference to another post made, as 
I cannot
> find what I am looking for
> I have simplified the formulae above as too lazy to fully type out
> everything in the brackets or check if correct, it is the procedure 
I am
> needing.
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> 
> 
>       Yahoo! Groups Sponsor
>             ADVERTISEMENT
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/