analytics
Browse files- app.py +24 -4
- requirements.txt +4 -3
app.py
CHANGED
@@ -13,6 +13,7 @@ TIME SERIES ANALYTICS
|
|
13 |
import yfinance as yf
|
14 |
import pandas as pd
|
15 |
from sklearn.preprocessing import StandardScaler
|
|
|
16 |
|
17 |
def trend(t):
|
18 |
'''
|
@@ -31,6 +32,23 @@ def trend(t):
|
|
31 |
d=df.tail(1).stack(level=-1).droplevel(0, axis=0)
|
32 |
'''
|
33 |
d=pd.read_pickle("data.pkl")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
return gr.ScatterPlot(d, x="Close_MA", y="Volume_MA",color='ticker')
|
35 |
|
36 |
'''
|
@@ -224,13 +242,15 @@ Use Case:
|
|
224 |
|
225 |
Maximizing Trading Efficiency: Personalize Your Asset Allocation for Optimal Growth
|
226 |
=========
|
227 |
-
The industry life cycle is a useful tool for traders to identify growth and decline industries. It describes the evolution of an industry based on its stages of growth and decline
|
228 |
|
229 |
-
|
|
|
230 |
|
231 |
-
|
|
|
|
|
232 |
|
233 |
-
By identifying growth and decline industries, traders can make informed investment decisions and speed up trading by investing in companies that are likely to experience growth in the future and avoiding companies that are likely to experience a decline in the future.
|
234 |
""")
|
235 |
|
236 |
demo.launch()
|
|
|
13 |
import yfinance as yf
|
14 |
import pandas as pd
|
15 |
from sklearn.preprocessing import StandardScaler
|
16 |
+
import plotly.express as px
|
17 |
|
18 |
def trend(t):
|
19 |
'''
|
|
|
32 |
d=df.tail(1).stack(level=-1).droplevel(0, axis=0)
|
33 |
'''
|
34 |
d=pd.read_pickle("data.pkl")
|
35 |
+
'''
|
36 |
+
fig = px.line(df, x="day", y=countries)
|
37 |
+
fig.update_layout(
|
38 |
+
title="Outbreak in " + month,
|
39 |
+
xaxis_title="Cases",
|
40 |
+
yaxis_title="Days Since Day 0",
|
41 |
+
)
|
42 |
+
return fig
|
43 |
+
'''
|
44 |
+
fig=px.scatter(d, x="Close_MA", y="Volume_MA",color='ticker')
|
45 |
+
fig.update_layout(
|
46 |
+
title="Top Right is the Growth Industry",
|
47 |
+
xaxis_title="Trend in Price",
|
48 |
+
yaxis_title="Trend in Volume",
|
49 |
+
)
|
50 |
+
return fig
|
51 |
+
return
|
52 |
return gr.ScatterPlot(d, x="Close_MA", y="Volume_MA",color='ticker')
|
53 |
|
54 |
'''
|
|
|
242 |
|
243 |
Maximizing Trading Efficiency: Personalize Your Asset Allocation for Optimal Growth
|
244 |
=========
|
245 |
+
The industry life cycle is a useful tool for traders to identify growth and decline industries. It describes the evolution of an industry based on its stages of growth and decline
|
246 |
|
247 |
+
#### There are four phases of the industry life cycle: introduction, growth, maturity, and decline
|
248 |
+
- By identifying growth and decline industries, traders can make informed investment decisions and speed up trading by investing in companies that are likely to experience growth in the future and avoiding companies that are likely to experience a decline in the future.
|
249 |
|
250 |
+
#### Personalize objective function and cost function
|
251 |
+
- cost function can prevent selecting decline industry
|
252 |
+
- objective function can identify potential industry
|
253 |
|
|
|
254 |
""")
|
255 |
|
256 |
demo.launch()
|
requirements.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
chromadb
|
2 |
fastai
|
3 |
-
pyarrow
|
4 |
pandas==2.1.3
|
5 |
-
yfinance==0.2.31
|
6 |
-
scikit-learn
|
|
|
|
1 |
chromadb
|
2 |
fastai
|
3 |
+
#pyarrow
|
4 |
pandas==2.1.3
|
5 |
+
#yfinance==0.2.31
|
6 |
+
#scikit-learn
|
7 |
+
plotly
|