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

RE: [amibroker] How to access exposures (holdings) in portfolio backtest



PureBytes Links

Trading Reference Links

Hello AB community,

Compliments to all of you who have provided me with so many insights 
and clarifications. This beats any manual or help-desk (except, of 
course, Tomasz himself).

I have been following your discussions for over a year now, although 
I didn't participate yet. I had hoped that I would be able to 
introduce myself, so to speak, by making a contribution instead of a 
request. As promised to Tomasz, I was, and still am planning to post 
my code on a risk factor model that is close to completion. I hope 
this will be beneficial to at least some of you, particularly those 
who attempt to integrate the fundamentals with the technicals, and 
compare performance to benchmarks.

However, I got stuck on an important aspect of this model which is 
the running exposures (holdings) within the portfolio that is 
backtested. Although Tomasz is contemplating to arrange for this data 
to be called directly within AFL, in the meantime I thought I put 
this problem to you.

Specifically, and from a portfolio-management point-of-view, I'd like 
to monitor the actual holdings (in $ or a % of total equity) of each 
and every security at each bar. The reason is that I need to 
calculate, based on my risk-factor model, the managed, as well as 
active risk I'm taking at each point in time. This is based on my 
absolute and relative weights (holdings) which allow me to calculate, 
for example, the absolute and relative contributions at both the risk-
factor, as well as individual asset level, in particular to my 
tracking error. All this needs to be calculated as time series, which 
in turn allows me to calculate how good a strategy/system is at 
predicting risk/return. PositionSize does determine the size of the 
holding at the time of the trade, but I need to continue to monitor 
each holding at every bar, even when there is no trade.

I've tried to re-engineer my holdings by first running the portfolio 
backtest, and then referring to the ~~~EQUITY array. I also know that 
details are logged in the detailed log, but has anybody found a more 
structural way to access/re-engineer this data?

I would appreciate any suggestions/feedback, and look forward to 
future cooperation.

Thanks,

Patrick




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 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:
     http://docs.yahoo.com/info/terms/