As of May 31, 2023, we have updated our Code of Conduct.
4 votes
Accepted

In R, Performance Analytics package, chart.Drawdown, plot several drawdowns curves on the same plot

No problem, just have a look at the following example from the documentation (p. 49): ...
vonjd's user avatar
  • 27.2k
4 votes

Multi-Period Contribution

Thanks for the example. It is exactly like my comment. Look at your weights after the first period. Are they really 80% and 20%? Lets say you have £100 to invest. £80 is invested in product A. That ...
AKdemy's user avatar
  • 6,869
3 votes
Accepted

R, Performance Analytics, How to chart continuous line with non continuous data?

I think your question draws on a larger issue: How to compare the performance of financial time series with missing data? The situation is indeed quite common that you have missing values for certain ...
vonjd's user avatar
  • 27.2k
3 votes

Portfolio returns with unequal asset return histories

You can use Bayesian methods. Missing data is not an intrinsic problem for Bayesian methods, however, you do need to understand why the data is missing before you use Bayesian methods. In your case, ...
Dave Harris's user avatar
  • 4,259
2 votes
Accepted

What value should the risk free monthly return rate be (Sharpe ratio calculation)?

The Daily Treasury Yield Curve Rates are a commonly used metric for the "risk-free" rate of return. Currently, the 1-month risk-free rate is 0.19%, and the 1-year risk-free rate is 0.50%. ...
David C's user avatar
  • 215
2 votes

Downside Market Capture Ratio: compute with sum or product?

David Addison's discussion of log versus simple(arithmetic) returns in his answer is correct, but this particular calculation has nothing to do with arithmetic versus log returns. Up Capture is ...
Brian G. Peterson's user avatar
2 votes
Accepted

Downside Market Capture Ratio: compute with sum or product?

I am not familiar with that R package, but I've written a few performance tracking libraries in my past life, so I might be able to add some insight. While it is indeed true that logarithmic returns ...
David Addison's user avatar
2 votes

Multi-Period Contribution

If you use geometric period returns (aka "continous", "exponential"), you can calculate an arithmetic average and this will give you the same result as if you would calculate this ...
ds_col's user avatar
  • 61
1 vote

Portfolio returns with unequal asset return histories

You've two options: Just use dates for which data is available for all assets Transform the price vectors to xts format ...
DataAdventurer's user avatar
1 vote
Accepted

R returns numeric(0) when putting p=0.995 for calculating VaR

The problem arises due to your data. Some of your columns do not have a negative value in that percentile (check for example XS1463101680 and ...
AK88's user avatar
  • 1,830
1 vote

What does it mean when cumulative return intersects or is below the risk free rate?

In essence, risky assets can perform awfully bad some of the time. What the theory says, intuitively, is that the distinct possibilities of large swings should, on average, command a commensurate ...
Stéphane's user avatar
  • 2,406
1 vote

How to maintain VaR at 5% and max return in Portfolio Analytics

You can use the ‘portfolio.optimization' Package with this you can optimize your portfolio with a VaR set at 5% Max target and try to find the right allocation by using the function : optimal....
Gogo78's user avatar
  • 486
1 vote

r: analyse series of historical positions as portfolio using 'standard' tools

Yes assuming this is a strategy where you are holding for multiple days you need to combine the data to get your entire portfolios return series: Get the daily price history for each asset you traded ...
Jared Marks's user avatar
1 vote
Accepted

performance attribution - security selection= wB*(Rp-RB) or wP*(Rp-RB)?

Brinson-Fachler attribution separates performance into three factors: a sector allocation, a security selection component and an interaction component. The interaction component measures the ...
Tim Wilding's user avatar
  • 1,386
1 vote

Return.portfolio function for re-balancing with time series of weights

It actually works if you convert the (time series) weight matrix to the frequency you want to use for re-balancing using, e.g. apply.weekly(weight_matrix). The ...
Falko Genzel's user avatar
1 vote

What value should the risk free monthly return rate be (Sharpe ratio calculation)?

The squareroot rule stems from the assumption, that the returns scale linear in time and the standard deviation scale with the squareroot of time. That means for the return of 1 year, that it should ...
Ami44's user avatar
  • 828
1 vote

Performance attribution for personal portfolio - weight attribution

Effective PA is dependent on the correct description of the investment process. I am not sure, from what you say, what exactly is your investment process. But let me presume that it is the following: ...
Andre Mirabelli's user avatar
1 vote

Return.portfolio error from PerformanceAnalytics package

Just ran into and solved this problem. Convert the timeSeries object into an xts object then change the indexClass to "Date" ...
user20169's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible