Questions tagged [performanceanalytics]

R package of Econometric tools for performance and risk analysis.

Filter by
Sorted by
Tagged with
12 votes
1 answer
1k views

How to compute modified-CVaR in the PerformanceAnalytics package?

My objective is to measure the modified-CVAR for a portfolio given its weights and matrix of security returns. Luckily the wonderful package PerformanceAnalytics has an ES() function that does just ...
Ram Ahluwalia's user avatar
7 votes
2 answers
254 views

Portfolio returns with unequal asset return histories

Using the package PerformanceAnalytics in R, I am trying to calculate the return of an equal-weighted portfolio that contains 30 assets. However, these assets do not have the same starting point in ...
JD1992's user avatar
  • 71
5 votes
3 answers
2k views

How do Order Management/Matching Systems match/allocate orders (and filled prices)?

I am working on an improvement of my company's order allocation system. We run a central Order Management System (OMS) but currently performance attribution from filled orders leaves room for ...
Matt Wolf's user avatar
  • 14.5k
5 votes
2 answers
1k views

Use Trades as Input for PerformanceAnalytics

I'd like to use the PerformanceAnalytics R package to view various metrics from a list of trades with profit values. From looking at the documentation from the PerformanceAnalytics package that most ...
Dave's user avatar
  • 171
4 votes
3 answers
26k views

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

In calculating an annualized Sharpe ratio using monthly returns, what is commonly used as the value for the risk free rate? I am using this formula: ...
shell's user avatar
  • 151
4 votes
2 answers
2k views

Looking for C# library that provides/contains performance analytics

I am looking for a C# .Net library that provides trade performance analytics similar to R-PerformanceAnalytics. Basic return statistics, draw-downs, risk-adjusted returns, risk (variations), ...
Matt Wolf's user avatar
  • 14.5k
4 votes
1 answer
946 views

Why annualized return and cumultive return aren't equal over 1-year period with Performance Analytics package in R?

I use Performance Analytics package in R to compare annualized and cumulative return of a portfolio. My expectation is that both should be equal over a period of 1-year but results tell me I'm wrong. ...
Florent's user avatar
  • 241
4 votes
1 answer
830 views

Return.portfolio error from PerformanceAnalytics package

When using the PerformanceAnalytics package of R, I am getting an error from the Return.portfolio function whenever I ask it to rebalance_on any frequency. If the rebalance parameter is removed, the ...
Rob Roy's user avatar
  • 41
4 votes
2 answers
778 views

Is there a way to adjust R PerformanceAnalytics function VaR with EWMA or GARCH method?

Is there a way to upgrade R PerformanceAnalytics function VaR with more risk sensitive approaches like EWMA or GARCH? Or is there another R package which can handle the issue?
Bobby Digital's user avatar
3 votes
1 answer
1k views

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

In R, with Performance analytics package, I am trying to chart multiple cumulative asset returns from an XTS object. The thing is that I miss some data from some asset returns so that the graph given ...
JoeBadAss's user avatar
2 votes
2 answers
290 views

Downside Market Capture Ratio: compute with sum or product?

I'm computing downside market capture ratio in R. The PerformanceAnalytics R package has a built-in UpDownRatios function which does this, but it computes the ratio using sums of returns, not ...
lebelinoz's user avatar
  • 274
2 votes
1 answer
832 views

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

Dear Stack Exchange community, Using Performance Analytics package, chart.Drawdown, I would like to plot several drawdowns curves on the same plot to be able to visually compare them. I know how to ...
JoeBadAss's user avatar
2 votes
1 answer
167 views

Market Timing Performance for a single stock

It seems there are models that study the market timing ability of funds. Models such as the Treynor-Mazuy and Merton-Henriksson. One can also study the bull beta and compare it to a bear beta. My ...
user1627466's user avatar
2 votes
2 answers
862 views

performance attribution

I am trying to do some performance attribution for a few portfolios we manage. What I am trying to examine are three different sources of returns: The general asset allocation Security Selection The ...
Avi's user avatar
  • 71
2 votes
3 answers
291 views

Industry convention to track trading performance against market indices?

I come from a programming background and not am no quant by career so this is probably a newbie question for you guys. I have written some code to pull daily closing values for market indices (DOW/...
Code Monkey's user avatar
2 votes
0 answers
73 views

Why does Beta of a stock not correlate well with market sell off

I posted a question a few days back: (Quantatively identifying stocks to short when overall market starts to roll-over) @rubikscube09 suggested that stock beta ...
cephalopod's user avatar
2 votes
1 answer
896 views

portfolio information ratio calculation on daily returns including hedged strategy results interpretation

I am tasked with calculating the portfolio information ratio on ~15 years of daily portfolio returns and I am finding several approaches online which is quite confusing. The first approach simply ...
trock2000's user avatar
  • 135
2 votes
0 answers
161 views

How to reset indicators in quantstrat / quantmod?

I am currently trying to back test a strategy on a file which contains minutely data for the whole month. I would like to reset my indicators at 3:30 PM . Is there a way I can reset the indicators ...
Yatharth Narang's user avatar
1 vote
1 answer
83 views

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

For Asset Allocation in R using Portfolio Analytics, is there a way to set risk as constant number, then optimize portfolio returns? For example, to maintain VaR always at 5% (conservative), how do ...
Kelly Chong's user avatar
1 vote
1 answer
3k views

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

My code actually works just fine. What I don't understand is, if I put p=0.995 instead of 0.95, the console gives me numeric(0). What can cause this error? However, when I use "gaussian" method, it ...
purpleblau's user avatar
1 vote
1 answer
2k views

Chart Correlation warnings

when I run chart.Correlation I get a series of warnings. I get the identical warnings with chart.Correlation(managers[,1:2],method="pearson") Here is a short sample: ...
Raghu Ramachandran's user avatar
1 vote
1 answer
322 views

Risk free rate for Performance Analytics

In [R] one can pass either a vector or scalar as the risk free rate. What is better? If I pass a vector to (for example) chart.riskreturnscatter then the sharpe ratio lines disappear. ...
Raghu Ramachandran's user avatar
1 vote
0 answers
112 views

Framework for analyzing transaction history

After many years of being discretionary trader I'm finally moving to systematized trading. I have all the transaction history from my broker I want to be the basis of my models. Is there a framework ...
kambi's user avatar
  • 161
1 vote
0 answers
87 views

Can we get the portfolio size approximation from the PnL? [closed]

Im wondering if we can get the portfolio size approximation, if we have the volatility and -/+ pnl of the portfolio ? Is there a method or a formula ? Example the annual volatility of 3% and daily ...
Gogo78's user avatar
  • 636
1 vote
0 answers
211 views

Issue with chart.RiskReturnScatter in performance analytics, need finite 'ylim' values error

I am currently trying to create a Risk Return Scatter plot using the following code ...
UTexas80's user avatar
1 vote
1 answer
146 views

How to correctly use SharpeRatio.annualized function with daily returns and proxy for daily risk free rate

I am not sure if am correctly using SharpeRatio.annualized function. I am passing following parameters (dailyRet, dailyRF, scale = 252), where dailyRet is an XTS type for daily returns, dailyRF is an ...
Tom Z's user avatar
  • 13
1 vote
0 answers
899 views

How to calculate cumulative returns with one lag in R

I have a huge data frame with over 1000 column, which are companies(column headers) and in each column I have their estimated return(monthly). The sample period of the data frame in 11 years. I want ...
Aquarius's user avatar
1 vote
1 answer
105 views

In theory historical performance of a portfolio

I am looking at the quantitative model our team is using for analyzing the performance of a portfolio of stocks. However I don't understand what the model is trying to achieve. The model is supposed ...
Xinchao's user avatar
  • 365
1 vote
0 answers
90 views

PerformanceAnalytics and Annual Charting

I have seen a charts that look's like Is it possible to do something like this with PerformanceAnalytics or is there any other package for doing this? Thanks in advance
xyx's user avatar
  • 11
1 vote
0 answers
508 views

Call options portfolio: what would the underlyings' moments to be maximized?

Let you have only three underlyings, like SPY, TLT and GLD, and you want to buy $n_{1}$ Call options on SPY, $n_{2}$ Call options on TLT and $n_{3}$ Call options on GLD... with a limited budget, that ...
Lisa Ann's user avatar
  • 2,131
0 votes
4 answers
2k views

Multi-Period Contribution

I've read multiple research papers but can't find a good answer as to why multi-period contributions don't add up to the returns of a portfolio. I understand that arithmetic sums miss the compounding ...
QFqs's user avatar
  • 115
0 votes
1 answer
23 views

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

I am learning about the basics of Risk Adjust Performance when I stumble upon something odd with some sample data about UPS. Clearly, the UPS stock's cumulative return is underperforming the market; ...
Lbui's user avatar
  • 1
0 votes
2 answers
213 views

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

I have a series of historical trading positions in the form Symbol OpenPrice OpenDate InvestmentInDollars CloseDate ReturnInDollars I need to evaluate the ...
Darrell Berry's user avatar
0 votes
1 answer
137 views

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

Really confused. Finding various different ways of calculating security selection alpha. I believe it matters from whose perspective one is looking at. I am a portfolio manager and I want to know ...
Malik's user avatar
  • 3
0 votes
1 answer
309 views

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

I am using the Return.portfolio function from the PerformanceAnalytics R package in order to re-balance the portfolio based on different frequencies (i.e. daily, weekly monthly, etc.) using a time ...
Falko Genzel's user avatar
0 votes
1 answer
531 views

Performance attribution for personal portfolio - weight attribution

i am building a platform for portfolio analytics, part of which is a performance attribution module. Given that most individual portfolio's can never have the same number of stocks as say, a mutual ...
Vikram Murthy's user avatar
0 votes
4 answers
1k views

How to do performance attribution for a few characteristics?

Let's say the characteristics that I am interested in are FX Country Security selection I have the benchmark weights and returns, the FX returns, and the portfolio weights and returns. Can someone ...
wwokkie's user avatar
0 votes
0 answers
48 views

Brinson Attribution - Overweight Underweight

I am looking to perform a geometric Brinson type attribution that is able to separate out the effects of underweights and overweight's of individual securities and groups individually. From an ...
ktj1989's user avatar
  • 101
0 votes
1 answer
169 views

Package ‘PerformanceAnalytics’ - Risk-free rate : Trouble using CAPM.beta() function

This is the first time I use the Package ‘PerformanceAnalytics’. I have a problem when it comes to use "Rf" (risk-free rate) when using the CAPM.beta. I use EONIA as a proxy for the risk free-rate. ...
bixoez's user avatar
  • 31