As I mentioned on your other post, please follow the posting guide and
do not post in HTML.
http://www.r-project.org/posting-guide.html
This one is a bit more decipherable.
The faber.R demo uses a fixed order quantity, as should be obvious from
orderqty=500
There is also a rebalancing demo that uses a fixed percentage of equity,
see
demo('faber_rebal')
It is, of course, impossible to compute a 10 month SMA without 10 months
of data.
Investments happen when there is a signal. If there is no signal, there
is no investment.
If you want to more closely follow Faber's paper, the 'faber_rebal' demo
is a much closer representation of the paper. Per the paper, the
investment is either in the market for a fixed percentage of equity, or
in cash.
Regards,
Brian
On 09/09/2014 08:13 AM, Andre Mikulec wrote:
Hi,May someone enlighten me?
I am running the faber.R demo
Here is the
urlhttps://r-forge.r-project.org/scm/viewvc.php/pkg/quantstrat/demo/faber.R?view=markup&root=blotter
Q # 1------Of the initial equity, I notice that 100,000 dollars invested.At
the start ,is the money split evenly, among the 9 sectors?
Each is invested 11,111.11 dollars? Is this true?
Or, is just a big pile of cash sitting there, waiting for the first transaction?
One reason why I am asking this is because the end result
offaber.stats$Net.Trading.PL seems to look like the average is around 11,000.
Q # 2-----I notice that financial data on the sectors is loaded the beginning
of 1999getSymbols( ... from='1999-01-01')
I notice that the first transaction starts 10 months later,is this because the
SMA of 10 months needs '10 months of data'?
[1] "1999-12-31 00:00:00 XLB 500 @ 26.58"[1] "2000-01-31 00:00:00 XLB -500 @ 23.33"[1] "2000-12-31
00:00:00 XLB 500 @ 21.42"[1] "2001-03-31 00:00:00 XLB -500 @ 19.97"[1] "2001-04-30 00:00:00 XLB 500 @
22.1"
Q # 3-----This relates to (Q # 1) and (Q # 2)At the time of "1999-12-31" is just the
"XLB" being 'invested in'?
Are the other sectors already invested? '1/9th of 100,000'? Or something
different?
Before "1999-12-31" is all of the 100,000 dollars in cash and 'not invested at
all'?
Q & 4-----Is 11,111.11 ('1/9th of 100,000') dollars being reserved for each
sector?If a 'sector' performs poorly and looses all of the 11,111.11 dollars,will
following future transactions 'to sell -500' just turn into '-0'?
Thank you,Andre mikulecandre_miku...@hotmail.com
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.