236 reputation
15
bio website
location United States
age 36
visits member for 2 years, 9 months
seen 17 hours ago

Nov
8
revised How to calculate unsystematic risk?
Added proper MathJax formatting for my answer
Nov
2
awarded  Yearling
Aug
31
awarded  Commentator
Aug
31
comment Rate Distortion Minimization in a Python Clustering Algorithm
@BobJansen, hmmmm, that's very true (my current version is 1.52) Although, because my implementation is a simple k-cluster, centroid / distance algorithm, scikit-learn should accomplish things fine as well. Let me know if you'd like to work on the idea in parallel, it'd be a fun project to collaborate on.
Aug
31
comment Rate Distortion Minimization in a Python Clustering Algorithm
@BobJansen, they're just Adj Close asset prices. Something like: data = pandas.io.dataDataReader(['IWB','IWR','IWM','SCZ','EFA','EEM','TIP','TLT','IEF,'‌​SHY','HYG','LQD','PCY','BWX','MBB','PFF','IYR','GLD','GSG'])['Adj Close'] should give you wide array of asset classes to set up (nearly) the same problem I was working on. And as an aside, I do see the PyCluster Library on PyPI.
Nov
19
comment Why do stocks with a negative beta return less than the risk free rate?
They don't have the same "risk"... risk (from a perspective of $\beta$) is having a low payoff when consumption is low, and a high payoff when consumption is "high."
Nov
19
awarded  Supporter
Nov
19
comment Why do stocks with a negative beta return less than the risk free rate?
Stock B does have the same risk of bad returns... but they occur in states of converse consumption levels. Think of an insurance policy, I pay 10 per mo and if I die my spouse gets 100,000. In the event I die, my wife will have made the return of $\frac{100,000}{10 x num premiums I paid} - 1$. Otherwise, her rate of return is a loss of every penny we've invested in the policy. You refer to a $\beta$ "to the market" which has a very specific meaning: "correlated to the aggregate market, i.e. systematic risk." Remember, Stock B only pays you less in the event the market appreciates.
Nov
19
answered Why do stocks with a negative beta return less than the risk free rate?
May
7
comment Rate Distortion Minimization in a Python Clustering Algorithm
let us continue this discussion in chat
May
7
comment Rate Distortion Minimization in a Python Clustering Algorithm
When you say my "observations aren't independent now", I'm not sure what you're referring to. I'm running a clustering algorithm on a correlation matrix, which I would call my "observations," and asset returns in finance are rarely (if ever) independent, so I'm not quite sure what you mean.
May
7
comment Rate Distortion Minimization in a Python Clustering Algorithm
@quasi, thanks for the reply. A little clarification, $\mathbf{\Sigma}$ as I've defined it, is the covariance matrix as an input to the distortion calculation. The clustering algorithm is being run on the correlation matrix of asset returns. So you're saying, I should set $\mathbf{\Sigma}$ equal to the Covariance of the correlation matrix (which is the input to my clustering algorithm), instead of the covariance of asset returns (which I'm currently doing), correct?
May
7
revised Rate Distortion Minimization in a Python Clustering Algorithm
added 616 characters in body
May
7
comment Rate Distortion Minimization in a Python Clustering Algorithm
Just posted the data, as well as a small script to show you exactly what I'm seeing (as well as the output). Thanks for the suggestion @quasi
May
7
revised Rate Distortion Minimization in a Python Clustering Algorithm
Added data and exact execution code to be able to run the analysis
May
7
awarded  Student
May
7
asked Rate Distortion Minimization in a Python Clustering Algorithm
Feb
16
comment Computing the Sharpe Ratio
step 1: Calculate log returns step 2: calculate volatility on log returns step 3: apply time scaling to volatility (i.e. $\sigma\cdot\sqrt{52}$) step 4: convert log returns to appropriate time scaled estimate (i.e. $r_{\textrm{daily}}\cdot252 = r_{\textrm{annual}}$ to the same time scale as volatility in step 3) step 5: convert log to geometric returns via $r_{\textrm{geometric}}=e^{r_{\textrm{log returns}}}-1$ for use in ex-post Sharpe Ratio
Feb
16
comment Computing the Sharpe Ratio
@Freddy, thanks for the positive feedback. Personally, I think it's really a question of accuracy and estimation consistency. If I want to accurately estimate a r.v. (Sharpe Ratio in this case), I might also want to simulate future realizations using simulation techniques, in which case getting the distribution and respective moments correct seems pretty important to me. Why is $\frac{P_t}{P_{t-1}}-1$, easier to calculate than $\log(\frac{P_t}{P_{t-1}})$?It's all calculated from the price series, and neither is more computationally costly, even if using an excel spreadsheet.
Feb
15
revised Computing the Sharpe Ratio
added 227 characters in body