janrswong commited on
Commit
15cf0ba
1 Parent(s): 3d367a6

added clickable link

Browse files
WTI.py CHANGED
@@ -8,6 +8,7 @@ import plotly.express as px
8
  from st_aggrid import GridOptionsBuilder, AgGrid
9
  import plotly.graph_objects as go
10
  from PIL import Image
 
11
 
12
 
13
  def displayWTI():
@@ -124,9 +125,18 @@ def displayWTI():
124
  AgGrid(file, key='dailyMetric', width='100%', fit_columns_on_grid_load=True,
125
  enable_enterprise_modules=True, theme='streamlit', gridOptions=page)
126
 
127
- # # TABLES aaaaaaa
128
  # sss = pd.read_csv('WTI/CopBook1.csv')
 
 
 
 
 
 
 
129
  # st.table(sss)
 
 
130
  st.header("Brent vs. WTI Accuracy Metrics & Best Models")
131
 
132
  arima = Image.open('assets/images/ARIMA2.png')
 
8
  from st_aggrid import GridOptionsBuilder, AgGrid
9
  import plotly.graph_objects as go
10
  from PIL import Image
11
+ import numpy as np
12
 
13
 
14
  def displayWTI():
 
125
  AgGrid(file, key='dailyMetric', width='100%', fit_columns_on_grid_load=True,
126
  enable_enterprise_modules=True, theme='streamlit', gridOptions=page)
127
 
128
+ # # # TABLES
129
  # sss = pd.read_csv('WTI/CopBook1.csv')
130
+ # sss = sss.replace(np.nan, '', regex=True)
131
+ # sss.rename(columns={'Unnamed: 0': ' '}, inplace=True)
132
+
133
+ # def highlight_max(x):
134
+ # return ['font-weight: bold' if v == x.loc[0] else ''
135
+ # for v in x]
136
+ # sss = sss.style.apply(highlight_max)
137
  # st.table(sss)
138
+
139
+ # BRENT WTI
140
  st.header("Brent vs. WTI Accuracy Metrics & Best Models")
141
 
142
  arima = Image.open('assets/images/ARIMA2.png')
__pycache__/WTI.cpython-38.pyc CHANGED
Binary files a/__pycache__/WTI.cpython-38.pyc and b/__pycache__/WTI.cpython-38.pyc differ
 
pages/1_🔎_About.py CHANGED
@@ -79,7 +79,7 @@ st.image(accuracy, caption='Visualization')
79
 
80
  # b. snippets of the paper
81
 
82
- st.markdown('<h1>Conclusions and Recommendations</h1> <p>The full documentation of this project can be accessed through this link: [https://bit.ly/PredictaPaper] </p><h2>Conclusions</h2> <h3>Price Movement Volatility Trends</h3> <p> Price movement volatility refers to how much a set of prices changes over time and how erratic those changes are. In crude oil prices, unless there are spikes or drops due to unforeseen or anomalous circumstances, these trends tend to stray away from erratic highs and lows especially over short periods of time. It must be reiterated that this study does not take into account these anomalies, but focuses on what would be the natural, steady trend of Brent crude oil prices. That being said, the conduction of the study simply paints a clear picture of the behavior of asset prices and how the value of volatility changes over spans of time. </p> <p> In order to quantify volatility, the standard deviation between the actual close prices (prices from the yfinance dataset) and the predicted prices are computed. From this part of the experiment, it was found that volatility is more likely to be present over longer periods of time. Additionally, it can be observed that volatility is also contingent on anomalous or external factors.</p> <p>It was found that Brent crude oil in particular shows the highest volatility trend over quarterly prices.</p>', unsafe_allow_html=True)
83
 
84
  st.markdown('<h3>Model Accuracy</h3> <p> Model accuracy is quantified through the use of accuracy metrics, specifically MAPE and MSE. These subsections are partitioned in accordance to the time interval of the raw data used, that being daily, weekly, monthly, and quarterly close prices.</p> <h4>Daily Interval Data</h4> <p>It was found that 96 of 102 or 94.12% ARIMA models and 3 of 3 or 100.00% LSTM models were able to attain a MAPE percentage below 10% and 96 of 102 or 94.12% ARIMA models and 3 of 3 or 100.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using daily interval data.</p> <h4>Weekly Interval Data</h4> <p>It was found that 42 of 48 or 87.50% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MAPE percentage below 10% and 22 of 48 or 45.83% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using weekly interval data.</p> <h4>Monthly Interval Data</h4> <p>It was found that 62 of 160 or 38.75% ARIMA model and 1 of 3 or 33.33% LSTM models were able to attain a MAPE percentage below 10% and 0 of 160 or 0.00% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using monthly interval data. </p> <h4>Quarterly Interval Data</h4> <p>It was found that 0 of 77 or 0.00% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MAPE percentage below 10% and 0 of 77 or 0.00% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using quarterly interval data.</p>', unsafe_allow_html=True)
85
 
 
79
 
80
  # b. snippets of the paper
81
 
82
+ st.markdown('<h1>Conclusions and Recommendations</h1> <p>The full documentation of this project can be accessed through this link: <a href="https://bit.ly/PredictaPaper" target="_blank" style="text-decoration:none; color: tomato;" >PredictaPaper</a>. </p><h2>Conclusions</h2> <h3>Price Movement Volatility Trends</h3> <p> Price movement volatility refers to how much a set of prices changes over time and how erratic those changes are. In crude oil prices, unless there are spikes or drops due to unforeseen or anomalous circumstances, these trends tend to stray away from erratic highs and lows especially over short periods of time. It must be reiterated that this study does not take into account these anomalies, but focuses on what would be the natural, steady trend of Brent crude oil prices. That being said, the conduction of the study simply paints a clear picture of the behavior of asset prices and how the value of volatility changes over spans of time. </p> <p> In order to quantify volatility, the standard deviation between the actual close prices (prices from the yfinance dataset) and the predicted prices are computed. From this part of the experiment, it was found that volatility is more likely to be present over longer periods of time. Additionally, it can be observed that volatility is also contingent on anomalous or external factors.</p> <p>It was found that Brent crude oil in particular shows the highest volatility trend over quarterly prices.</p>', unsafe_allow_html=True)
83
 
84
  st.markdown('<h3>Model Accuracy</h3> <p> Model accuracy is quantified through the use of accuracy metrics, specifically MAPE and MSE. These subsections are partitioned in accordance to the time interval of the raw data used, that being daily, weekly, monthly, and quarterly close prices.</p> <h4>Daily Interval Data</h4> <p>It was found that 96 of 102 or 94.12% ARIMA models and 3 of 3 or 100.00% LSTM models were able to attain a MAPE percentage below 10% and 96 of 102 or 94.12% ARIMA models and 3 of 3 or 100.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using daily interval data.</p> <h4>Weekly Interval Data</h4> <p>It was found that 42 of 48 or 87.50% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MAPE percentage below 10% and 22 of 48 or 45.83% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using weekly interval data.</p> <h4>Monthly Interval Data</h4> <p>It was found that 62 of 160 or 38.75% ARIMA model and 1 of 3 or 33.33% LSTM models were able to attain a MAPE percentage below 10% and 0 of 160 or 0.00% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using monthly interval data. </p> <h4>Quarterly Interval Data</h4> <p>It was found that 0 of 77 or 0.00% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MAPE percentage below 10% and 0 of 77 or 0.00% ARIMA models and 0 of 3 or 0.00% LSTM models were able to attain a MSE percentage close to 0 or less than 0.1 using quarterly interval data.</p>', unsafe_allow_html=True)
85