Skip to content

Commit 66e0541

Browse files
committed
chore: reformat with black
1 parent f9b3817 commit 66e0541

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

examples/02 index funds perfomance.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
" \"VOO.US\",\n",
156156
" \"IVV.US\",\n",
157157
"] # the benchmark symbol should be in the first place\n",
158-
"sp = ok.AssetList(symbols, last_date='2022-04')\n",
158+
"sp = ok.AssetList(symbols, last_date=\"2022-04\")\n",
159159
"sp"
160160
]
161161
},
@@ -291,7 +291,7 @@
291291
}
292292
],
293293
"source": [
294-
"sp.tracking_difference_annualized(rolling_window=5*12).plot() # rolling window is 5 years"
294+
"sp.tracking_difference_annualized(rolling_window=5 * 12).plot() # rolling window is 5 years"
295295
]
296296
},
297297
{

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import okama as ok
22

3-
x = ok.AssetList(['SPY.US', 'BND.US', 'GLD.US'], inflation=False)
3+
x = ok.AssetList(["SPY.US", "BND.US", "GLD.US"], inflation=False)
44
print(x.assets_last_dates)

tests/test_frontier.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ def test_ef_points(init_efficient_frontier):
112112

113113

114114
test_tangency_data = [
115-
(False, [0.409596, 0.590404], 0.1627), # cagr = False
116-
(True, [0.424916, 0.575084], 0.15617) # cagr = True
115+
(False, [0.409596, 0.590404], 0.1627), # cagr = False
116+
(True, [0.424916, 0.575084], 0.15617), # cagr = True
117117
]
118118

119119

120-
@pytest.mark.parametrize("cagr, expected_weights, expected_return",
121-
test_tangency_data,
122-
ids=["MSR Arithmetic mean", "MSR geometric mean"])
120+
@pytest.mark.parametrize(
121+
"cagr, expected_weights, expected_return", test_tangency_data, ids=["MSR Arithmetic mean", "MSR geometric mean"]
122+
)
123123
@mark.frontier
124124
def test_get_tangency_portfolio(init_efficient_frontier, cagr, expected_weights, expected_return):
125125
rf_rate = 0.05

0 commit comments

Comments
 (0)