Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,20 +5,17 @@ from pypfopt.discrete_allocation import DiscreteAllocation, get_latest_prices
|
|
5 |
from pypfopt import EfficientFrontier
|
6 |
from pypfopt import risk_models
|
7 |
from pypfopt import expected_returns
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
from pypfopt import plotting
|
9 |
import copy
|
10 |
import numpy as np
|
11 |
import pandas as pd
|
12 |
import plotly.express as px
|
13 |
-
from pypfopt import plotting
|
14 |
-
import matplotlib.pyplot as plt
|
15 |
-
|
16 |
-
try:
|
17 |
-
plt.style.use("seaborn-deep")
|
18 |
-
except OSError:
|
19 |
-
print("'seaborn-deep' ์คํ์ผ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๊ธฐ๋ณธ ์คํ์ผ์ ์ฌ์ฉํฉ๋๋ค.")
|
20 |
-
plt.style.use("default") # ๊ธฐ๋ณธ ์คํ์ผ ์ฌ์ฉ
|
21 |
-
|
22 |
|
23 |
def plot_cum_returns(data, title, initial_capital=1000):
|
24 |
# ์ผ์ผ ๋์ ์์ต๋ฅ ๊ณ์ฐ ๋ฐ ์๊ฐํ
|
|
|
5 |
from pypfopt import EfficientFrontier
|
6 |
from pypfopt import risk_models
|
7 |
from pypfopt import expected_returns
|
8 |
+
import matplotlib.pyplot as plt
|
9 |
+
if "seaborn-deep" in plt.style.available:
|
10 |
+
plt.style.use("seaborn-deep")
|
11 |
+
else:
|
12 |
+
print("'seaborn-deep' ์คํ์ผ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๊ธฐ๋ณธ ์คํ์ผ์ ์ฌ์ฉํฉ๋๋ค.")
|
13 |
+
plt.style.use("default")
|
14 |
from pypfopt import plotting
|
15 |
import copy
|
16 |
import numpy as np
|
17 |
import pandas as pd
|
18 |
import plotly.express as px
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
def plot_cum_returns(data, title, initial_capital=1000):
|
21 |
# ์ผ์ผ ๋์ ์์ต๋ฅ ๊ณ์ฐ ๋ฐ ์๊ฐํ
|