 # PerformanceAnalytics: NA Burke ratio

Dear community,

I am working with Performance measurements. Here is a Repex of an issue I am facing. Some time series in my data pool are generating NA for Burke ratio, Jensen ratio, etc. I am missing something here but I do not know if it is about using the package or about the data. So if anyone with some R or Finance knowledge, please share your ideas and experience.

Regards,

jm

``````library(quantmod)
library(PerformanceAnalytics)

getSymbols.yahoo(
Symbols = 'DXQLX',
env = .GlobalEnv,
periodicity = "monthly",
return.class = 'xts'
)

mylogreturn = CalculateReturns(
method = 'log'
)

table.Stats(
mylogreturn
)

SharpeRatio.annualized(
R = mylogreturn,
Rf = 0.0,
scale = 12,
geometric = TRUE
)

SharpeRatio.annualized(
R = mylogreturn,
Rf = 0.0,
scale = 12,
geometric = FALSE
)

R = mylogreturn,
Rf = 0.0,
scale = 12
)

R = mylogreturn,
Rf = 0.0,
scale = 12,
geometric = FALSE
)

BurkeRatio(
R = mylogreturn,
Rf = 0.0,
modified = FALSE
)

``````

The two NaN warnings trace to mylogreturn's first entry

``````mylogreturn
2007-01-01             NA
``````

Hi,

Thank you for your post, it triggered a new look at the issue. I think now I understand what I was doing wrong.

By design, returns time series have a NA on first period. It is not the source of the issue as doing the same code with another ticker like the DJ index would produce numeric values. Even when the first return is not filtered out.

The issue is with the type of returns expected by the function. Simple versus log here. The difference being that a simple return lowest possible value is -1. For the ticker in exemple, we have a log return of -1.6 end of 2017. That's what output the NA without much other information.

So changing the method of calculate returns from log to discrete does solve the problem.

Regards,

jm

1 Like

Great! Thanks for posting your solution to educate me and future pilgrims.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.