Reputation
266
Top tag
Next privilege 350 Rep.
Access review queues
Badges
1 6
Newest
 Critic
Impact
~51k people reached

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
Mar
19
revised Except Zipline, are there any other Pythonic algorithmic trading library I can choose?
added 19 characters in body
Mar
5
awarded  Critic
Feb
27
answered Except Zipline, are there any other Pythonic algorithmic trading library I can choose?
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