Advertisement
tvaught

portfolio_utils interaction

Aug 30th, 2011
3,483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. In [2]: pwd
  2. Out[2]: u'/Users/travis/git/experimental/portfolio_metrics'
  3.  
  4. In [3]: import price_utils
  5. In [4]: d = price_utils.get_yahoo_prices(symbol="VLO", startdate="1995-1-1", enddate="2011-08-24")
  6.  
  7. In [5]: d.dtype
  8. Out[5]: dtype([('symbol', '|S8'), ('date', ('<M8[us]', {})), ('open', '<f8'), ('high', '<f8'), ('low', '<f8'), ('close', '<f8'), ('volume', '<f8'), ('adj_close', '<f8')])
  9.  
  10. In [6]: len(d)
  11. Out[6]: 4186
  12.  
  13. In [7]: d[0]
  14. Out[7]: ('VLO', datetime.datetime(2011, 8, 24, 0, 0), 20.12, 20.56, 19.8, 20.46, 9280400.0, 20.46)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement