2
$\begingroup$

I'm fairly new to the quant finance space, and I was hoping to get some guidance. Say I have a csv/excel file with columns of daily returns data for various asset classes or securities (one column per asset). I want to be able to import these returns data into Python, probably as lists/arrays.

If there are many days worth of data (say 10 years worth), what's the best way to go about this, import-wise and data structure-wise? Any packages that could help?

A minor note, I was considering using dictionaries so I could still retain the date/day, whereas if I just use lists I would just index it as 1,2,3,4...n_th day.

Thanks!

$\endgroup$
  • $\begingroup$ I'm afraid this is a stack-overflow question. $\endgroup$ – HelloWorld Jun 4 '15 at 3:14
  • $\begingroup$ I'm not sure SO would take it but it has been answered (satisfactorily IMO) now anyways. So I close it as this is not a good example of the kind of questions we want. $\endgroup$ – Bob Jansen Jun 4 '15 at 7:21
  • $\begingroup$ I'm voting to close this question as off-topic because "I'm afraid this is a stack-overflow question" but it has already been answered. $\endgroup$ – Bob Jansen Jun 4 '15 at 7:21
1
$\begingroup$

True this is a stackoverflow question but have you tried the fool around with the package Pandas? You can do in Python

import pandas as pd

data = pd.read_csv('filepath/file.csv')

That's the easiest way.

| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.