should be last lint

This commit is contained in:
Jamie
2021-04-14 12:13:54 -04:00
parent b14fee3d38
commit 7fdb601ac5
2 changed files with 5 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ def my_autopct(x):
return ""
def pie_chart_weights(weights: dict, optimizer: str, value: Optional[float]):
def pie_chart_weights(weights: dict, optimizer: str, value: float):
"""
Show a pie chart of holdings
Parameters

View File

@@ -81,7 +81,7 @@ def equal_weight(stocks: List[str], other_args: List[str]):
for stock in stocks:
values[stock] = ns_parser.value * round(1 / n_stocks, 5)
if ns_parser.pie:
pie_chart_weights(values, "equal", None)
pie_chart_weights(values, "equal", 0)
if n_stocks >= 1:
print("Equal Weight Portfolio: ")
display_weights(values)
@@ -147,7 +147,7 @@ def property_weighting(stocks: List[str], property_type: str, other_args: List[s
weights[k] = round(v / prop_sum, 5) * ns_parser.value
if ns_parser.pie:
pie_chart_weights(weights, property_type, None)
pie_chart_weights(weights, property_type, 0)
if property_type == "marketCap":
print("Market Cap Weighted Portfolio: ")
@@ -225,7 +225,7 @@ def ef_portfolio(stocks: List[str], port_type: str, other_args: List[str]):
key: ns_parser.value * round(value, 5)
for key, value in ef_sharpe.items()
}
val = None
val = 0
print("Weights that maximize Sharpe Ratio:")
elif port_type == "min_volatility":
@@ -235,7 +235,7 @@ def ef_portfolio(stocks: List[str], port_type: str, other_args: List[str]):
key: ns_parser.value * round(value, 5)
for key, value in ef_min_vol.items()
}
val = None
val = 0
print("Weights that minimize volatility")
elif port_type == "eff_risk":