prasanth.thangavel commited on
Commit
04cf5a7
·
1 Parent(s): f8d03ab

Update package versions

Browse files
Files changed (3) hide show
  1. app.py +5 -3
  2. notebooks/scratchpad.ipynb +31 -24
  3. requirements.txt +1 -1
app.py CHANGED
@@ -10,11 +10,13 @@ from utils.yfinance_utils import fetch_yfinance_daily
10
  from utils.currency_utils import get_usd_sgd_rate
11
  from utils.fd_utils import calculate_fd_returns
12
 
13
- print("Starting the app")
14
 
15
  # Sanity check on the yfinance_utils
16
- print("Sanity check on the yfinance_utils")
17
- print(fetch_yfinance_daily("MSFT", "2020-01-01", "2020-01-03"))
 
 
18
 
19
  # Set page config
20
  st.set_page_config(page_title="Asset Class Comparison", layout="wide")
 
10
  from utils.currency_utils import get_usd_sgd_rate
11
  from utils.fd_utils import calculate_fd_returns
12
 
13
+ print("Starting the app ...")
14
 
15
  # Sanity check on the yfinance_utils
16
+ print("Sanity check on the yfinance_utils ...")
17
+ # print(fetch_yfinance_daily("MSFT", "2020-01-01", "2020-01-03"))
18
+ data = yf.download("MSFT", "2020-01-01", "2020-01-03")
19
+ print(data.head())
20
 
21
  # Set page config
22
  st.set_page_config(page_title="Asset Class Comparison", layout="wide")
notebooks/scratchpad.ipynb CHANGED
@@ -2,7 +2,7 @@
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
- "execution_count": 2,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
@@ -11,9 +11,16 @@
11
  },
12
  {
13
  "cell_type": "code",
14
- "execution_count": 14,
15
  "metadata": {},
16
  "outputs": [
 
 
 
 
 
 
 
17
  {
18
  "name": "stderr",
19
  "output_type": "stream",
@@ -32,7 +39,7 @@
32
  },
33
  {
34
  "cell_type": "code",
35
- "execution_count": 15,
36
  "metadata": {},
37
  "outputs": [
38
  {
@@ -86,10 +93,10 @@
86
  " <tbody>\n",
87
  " <tr>\n",
88
  " <th>2012-05-18</th>\n",
89
- " <td>38.050671</td>\n",
90
- " <td>44.788914</td>\n",
91
- " <td>37.821750</td>\n",
92
- " <td>41.852752</td>\n",
93
  " <td>573576400</td>\n",
94
  " </tr>\n",
95
  " <tr>\n",
@@ -102,10 +109,10 @@
102
  " </tr>\n",
103
  " <tr>\n",
104
  " <th>2012-05-22</th>\n",
105
- " <td>30.854584</td>\n",
106
- " <td>33.432435</td>\n",
107
- " <td>30.794866</td>\n",
108
- " <td>32.457032</td>\n",
109
  " <td>101786600</td>\n",
110
  " </tr>\n",
111
  " <tr>\n",
@@ -134,10 +141,10 @@
134
  " </tr>\n",
135
  " <tr>\n",
136
  " <th>2020-01-03</th>\n",
137
- " <td>207.691162</td>\n",
138
- " <td>209.413043</td>\n",
139
- " <td>205.979229</td>\n",
140
- " <td>206.238019</td>\n",
141
  " <td>11188400</td>\n",
142
  " </tr>\n",
143
  " <tr>\n",
@@ -166,10 +173,10 @@
166
  " </tr>\n",
167
  " <tr>\n",
168
  " <th>2020-01-09</th>\n",
169
- " <td>217.275970</td>\n",
170
- " <td>217.355597</td>\n",
171
- " <td>215.265442</td>\n",
172
- " <td>216.519526</td>\n",
173
  " <td>12642800</td>\n",
174
  " </tr>\n",
175
  " </tbody>\n",
@@ -181,22 +188,22 @@
181
  "Price Close High Low Open Volume\n",
182
  "Ticker META META META META META\n",
183
  "Date \n",
184
- "2012-05-18 38.050671 44.788914 37.821750 41.852752 573576400\n",
185
  "2012-05-21 33.870365 36.488029 32.845198 36.358638 168192700\n",
186
- "2012-05-22 30.854584 33.432435 30.794866 32.457032 101786600\n",
187
  "2012-05-23 31.849892 32.347546 31.212894 31.222848 73600000\n",
188
  "2012-05-24 32.875057 33.054213 31.620969 32.795434 50237200\n",
189
  "... ... ... ... ... ...\n",
190
- "2020-01-03 207.691162 209.413043 205.979229 206.238019 11188400\n",
191
  "2020-01-06 211.602707 211.781855 205.551226 205.730374 17058900\n",
192
  "2020-01-07 212.060547 213.573421 210.756694 211.821682 14912400\n",
193
  "2020-01-08 214.210419 215.225638 211.612661 212.000831 13475000\n",
194
- "2020-01-09 217.275970 217.355597 215.265442 216.519526 12642800\n",
195
  "\n",
196
  "[1923 rows x 5 columns]"
197
  ]
198
  },
199
- "execution_count": 15,
200
  "metadata": {},
201
  "output_type": "execute_result"
202
  }
 
2
  "cells": [
3
  {
4
  "cell_type": "code",
5
+ "execution_count": 1,
6
  "metadata": {},
7
  "outputs": [],
8
  "source": [
 
11
  },
12
  {
13
  "cell_type": "code",
14
+ "execution_count": 2,
15
  "metadata": {},
16
  "outputs": [
17
+ {
18
+ "name": "stdout",
19
+ "output_type": "stream",
20
+ "text": [
21
+ "YF.download() has changed argument auto_adjust default to True\n"
22
+ ]
23
+ },
24
  {
25
  "name": "stderr",
26
  "output_type": "stream",
 
39
  },
40
  {
41
  "cell_type": "code",
42
+ "execution_count": 3,
43
  "metadata": {},
44
  "outputs": [
45
  {
 
93
  " <tbody>\n",
94
  " <tr>\n",
95
  " <th>2012-05-18</th>\n",
96
+ " <td>38.050663</td>\n",
97
+ " <td>44.788905</td>\n",
98
+ " <td>37.821742</td>\n",
99
+ " <td>41.852743</td>\n",
100
  " <td>573576400</td>\n",
101
  " </tr>\n",
102
  " <tr>\n",
 
109
  " </tr>\n",
110
  " <tr>\n",
111
  " <th>2012-05-22</th>\n",
112
+ " <td>30.854582</td>\n",
113
+ " <td>33.432433</td>\n",
114
+ " <td>30.794864</td>\n",
115
+ " <td>32.457030</td>\n",
116
  " <td>101786600</td>\n",
117
  " </tr>\n",
118
  " <tr>\n",
 
141
  " </tr>\n",
142
  " <tr>\n",
143
  " <th>2020-01-03</th>\n",
144
+ " <td>207.691132</td>\n",
145
+ " <td>209.413012</td>\n",
146
+ " <td>205.979199</td>\n",
147
+ " <td>206.237989</td>\n",
148
  " <td>11188400</td>\n",
149
  " </tr>\n",
150
  " <tr>\n",
 
173
  " </tr>\n",
174
  " <tr>\n",
175
  " <th>2020-01-09</th>\n",
176
+ " <td>217.275986</td>\n",
177
+ " <td>217.355612</td>\n",
178
+ " <td>215.265457</td>\n",
179
+ " <td>216.519541</td>\n",
180
  " <td>12642800</td>\n",
181
  " </tr>\n",
182
  " </tbody>\n",
 
188
  "Price Close High Low Open Volume\n",
189
  "Ticker META META META META META\n",
190
  "Date \n",
191
+ "2012-05-18 38.050663 44.788905 37.821742 41.852743 573576400\n",
192
  "2012-05-21 33.870365 36.488029 32.845198 36.358638 168192700\n",
193
+ "2012-05-22 30.854582 33.432433 30.794864 32.457030 101786600\n",
194
  "2012-05-23 31.849892 32.347546 31.212894 31.222848 73600000\n",
195
  "2012-05-24 32.875057 33.054213 31.620969 32.795434 50237200\n",
196
  "... ... ... ... ... ...\n",
197
+ "2020-01-03 207.691132 209.413012 205.979199 206.237989 11188400\n",
198
  "2020-01-06 211.602707 211.781855 205.551226 205.730374 17058900\n",
199
  "2020-01-07 212.060547 213.573421 210.756694 211.821682 14912400\n",
200
  "2020-01-08 214.210419 215.225638 211.612661 212.000831 13475000\n",
201
+ "2020-01-09 217.275986 217.355612 215.265457 216.519541 12642800\n",
202
  "\n",
203
  "[1923 rows x 5 columns]"
204
  ]
205
  },
206
+ "execution_count": 3,
207
  "metadata": {},
208
  "output_type": "execute_result"
209
  }
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  streamlit==1.32.0
2
  pandas==2.2.1
3
- yfinance==0.2.36
4
  plotly==5.19.0
5
  python-dotenv==1.0.1
6
  numpy==1.26.4
 
1
  streamlit==1.32.0
2
  pandas==2.2.1
3
+ yfinance==0.2.56
4
  plotly==5.19.0
5
  python-dotenv==1.0.1
6
  numpy==1.26.4