Skip to content

Commit 05f9688

Browse files
committed
[heavy_tail] Retrieve data from yahoo finance
1 parent 1fc33ca commit 05f9688

File tree

4 files changed

+4703
-17
lines changed

4 files changed

+4703
-17
lines changed

RetrieveData.ipynb

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "5a8b8795-232a-4839-aced-5dbdc7965fc4",
6+
"metadata": {},
7+
"source": [
8+
"The Following retrieves data needed for [heavy_tails]"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": 2,
14+
"id": "2822e5f8-d817-4e7b-8568-080571fcdb08",
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"name": "stderr",
19+
"output_type": "stream",
20+
"text": [
21+
"[*********************100%***********************] 1 of 1 completed\n",
22+
"[*********************100%***********************] 1 of 1 completed\n"
23+
]
24+
}
25+
],
26+
"source": [
27+
"# Might need to run `pip install --upgrade yfinance` first\n",
28+
"import yfinance as yf\n",
29+
"\n",
30+
"# Download the data for AMZN\n",
31+
"Amazon_data = yf.download('AMZN', start='2015-01-01', end='2022-07-01')\n",
32+
"Bitcoin_data = yf.download('BTC-USD', '2015-1-1', '2022-7-1')\n",
33+
"\n",
34+
"Amazon_data.to_csv('lectures/datasets/Amazon_data.csv')\n",
35+
"Bitcoin_data.to_csv('lectures/datasets/Bitcoin_data.csv')"
36+
]
37+
}
38+
],
39+
"metadata": {
40+
"kernelspec": {
41+
"display_name": "Python 3 (ipykernel)",
42+
"language": "python",
43+
"name": "python3"
44+
},
45+
"language_info": {
46+
"codemirror_mode": {
47+
"name": "ipython",
48+
"version": 3
49+
},
50+
"file_extension": ".py",
51+
"mimetype": "text/x-python",
52+
"name": "python",
53+
"nbconvert_exporter": "python",
54+
"pygments_lexer": "ipython3",
55+
"version": "3.11.7"
56+
}
57+
},
58+
"nbformat": 4,
59+
"nbformat_minor": 5
60+
}

0 commit comments

Comments
 (0)