1
vote
2answers
873 views

Calculate Average Price, Cost, (Un)Realized P&L of a position based on executed trades

We have built an algorithmic trading software and need to calculate the following parameters for each position in our portfolio. Average Price Cost Realized Profit & Loss Unrealized Profit & ...
2
votes
3answers
531 views

How to annualize dividends paid at varying intervals?

I am attempting to write a function that will calculate the annualized rate of return for individual dividends made by illiquid investments. These dividends are paid at varying intervals and the ...
17
votes
2answers
651 views

How do you correct Max Draw-Down for auto-correlation?

When returns are auto-correlated, calculating a Sharpe ratio := $\frac {mean(x)}{\sqrt{var(x)}}$, (where $x$ are the returns) is complicated, but basically solved (see, e.g. Lo (2005)). Without the ...