0
$\begingroup$

A complete rookie here.

I'm currently reading Ernie Chan's 'Algorithmic Trading' and trying to recreate his results with quantstrat in R. Everything seems to be fine except for portfolio return calculation part. In his book EC uses the following formula for daily returns:

daily_return = net_daily_p&l / yesterdays_gross_portfolio_value

while PortfReturns function in R definitely returns something like this:

daily_return = net_daily_p&l / initial_account_equity

which makes impressive EC's plots and Sharpe-values not so impressive at all. Are these different methodologies for return calculation or am I missing something important?

$\endgroup$
0
$\begingroup$

Yes, they're certainly different ways of describing performance. Both may be better suited depending on your requirements.

If I had to illustrate a portfolio's consistency-of-return aspect, I would use yesterdays_gross_portfolio_value. The main reason is that as the portfolio grows and so might the absolute daily return values and if you used initial_account_equity as the denominator, you'd end up getting an increasing function, wherein the returns are only bigger because of more capital that is "invested", not because of actual alpha.

On the other hand, if you were only concerned with showing how your initial investment grew over a period of time rather than how it got there, you may want to use initial_account_equity.

$\endgroup$
  • $\begingroup$ Thank you Tanmay! It's much clearer now. The only thing that still bothers me is that Ernie Chan uses his yesterdays_gross_portfolio_value-based returns to calculate Sharpe ratio. My rather naive understanding was that there's only one true method of calculating metrics like Sharpe. Otherwise the comparison between different strategies becomes somewhat cumbersome. $\endgroup$ – Vyacheslav Zotov Jan 13 '18 at 2:34
0
$\begingroup$

the initial_account_equity might refer to the base capital amount. in this case, it will not be "yesterdays" value... you need to check the packs help docs.

$\endgroup$
  • $\begingroup$ That's exactly what I'm trying to understand - why Ernie Chang uses yesterday's gross value instead of base capital amount. $\endgroup$ – Vyacheslav Zotov Jan 11 '18 at 9:22
  • $\begingroup$ b/c every day you have a different base of capital and you are trying to calculate the daily change (or return). daily. $\endgroup$ – Giladbi Jan 11 '18 at 12:30
  • $\begingroup$ I think the issue is whether you keep the profits (and losses) in the account so the account grows over time, or whether you maintain the account close to initial_account_value by withdrawing the profits/replenishing the losses as time goes on. $\endgroup$ – noob2 Jan 11 '18 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.