title: How to calculate covariance Matrix with Pandas
body: <p>I'm trying to figure out how to calculate a covariance matrix with Pandas.
  I'm not a data scientist or a finance guy, i'm just a regular dev going a out of his league.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  df = pd.DataFrame(np.random.randint(0,100,size=(252, 4)), columns=list('ABCD'))
  print(df.cov())
  </code></pre>
  
  <p>So, if I do this, I get that kind of output:</p>
  
  <p><a href="https://i.stack.imgur.com/EQTkJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EQTkJ.png" alt="enter image description here"></a></p>
  
  <p>I find that the number are huge, and i was expecting  them to be closer to zero. Do i have to calculate the return before getting the cov ?</p>
  
  <p>Does anyone familiar with this could explain this a little bit or point me to a good link with explanation ? I couldn't find any link to Covariance Matrix For Dummies.</p>
  
  <p>Regards,
  Julien</p>