I left out the risk free rate in this example because I wanted to keep it simple for the forum, but I do use it in my actual script. Right now, I'm using monthly returns. I have no idea how Yahoo calculates it. I am using Yahoo to check and confirm I am computing things correctly in my...
Can you elaborate? Even after I use endpoints() to subset end-of-month prices before computing monthly returns, I got the same monthlyRTN, and thus, same SharpeRatio as before.
I'm confused and having issues using `SharpeRatio` from the `PerformanceAnalytics` package. After all was said and done, I can't seem to get my number to match the sharpe ratio posted on Yahoo Finance.
Here's my procedure (I'll try to keep it simple):
> getSymbols("XLU", src = "yahoo"...