Skip to content

Commit 34570a4

Browse files
author
Scott Sanderson
committed
DOC: Fix typo in docs for out parameter.
1 parent 6181ab6 commit 34570a4

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

empyrical/stats.py

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def unary_vectorized_roll(arr, window, out=None, **kwargs):
3737
window : int
3838
Size of the rolling window in terms of the periodicity of the data.
3939
out : array-like, optional
40-
The array to store the store the output.
40+
Array to use as output buffer.
41+
If not passed, a new array will be created.
4142
**kwargs
4243
Forwarded to :func:`~empyrical.{name}`.
4344
@@ -84,7 +85,8 @@ def binary_vectorized_roll(lhs, rhs, window, out=None, **kwargs):
8485
window : int
8586
Size of the rolling window in terms of the periodicity of the data.
8687
out : array-like, optional
87-
The array to store the store the output.
88+
Array to use as output buffer.
89+
If not passed, a new array will be created.
8890
**kwargs
8991
Forwarded to :func:`~empyrical.{name}`.
9092
@@ -203,7 +205,8 @@ def cum_returns(returns, starting_value=0, out=None):
203205
starting_value : float, optional
204206
The starting returns.
205207
out : array-like, optional
206-
The array to store the store the output.
208+
Array to use as output buffer.
209+
If not passed, a new array will be created.
207210
208211
Returns
209212
-------
@@ -317,7 +320,8 @@ def max_drawdown(returns, out=None):
317320
Daily returns of the strategy, noncumulative.
318321
- See full explanation in :func:`~empyrical.stats.cum_returns`.
319322
out : array-like, optional
320-
The array to store the store the output.
323+
Array to use as output buffer.
324+
If not passed, a new array will be created.
321325
322326
Returns
323327
-------
@@ -470,7 +474,8 @@ def annual_volatility(returns,
470474
returns into annual returns. Value should be the annual frequency of
471475
`returns`.
472476
out : array-like, optional
473-
The array to store the store the output.
477+
Array to use as output buffer.
478+
If not passed, a new array will be created.
474479
475480
Returns
476481
-------
@@ -634,7 +639,8 @@ def sharpe_ratio(returns,
634639
returns into annual returns. Value should be the annual frequency of
635640
`returns`.
636641
out : array-like, optional
637-
The array to store the store the output.
642+
Array to use as output buffer.
643+
If not passed, a new array will be created.
638644
639645
Returns
640646
-------
@@ -712,7 +718,8 @@ def sortino_ratio(returns,
712718
The downside risk of the given inputs, if known. Will be calculated if
713719
not provided.
714720
out : array-like, optional
715-
The array to store the store the output.
721+
Array to use as output buffer.
722+
If not passed, a new array will be created.
716723
717724
Returns
718725
-------
@@ -791,7 +798,8 @@ def downside_risk(returns,
791798
returns into annual returns. Value should be the annual frequency of
792799
`returns`.
793800
out : array-like, optional
794-
The array to store the store the output.
801+
Array to use as output buffer.
802+
If not passed, a new array will be created.
795803
796804
Returns
797805
-------
@@ -856,7 +864,8 @@ def excess_sharpe(returns, factor_returns, out=None):
856864
factor_returns: float / series
857865
Benchmark return to compare returns against.
858866
out : array-like, optional
859-
The array to store the store the output.
867+
Array to use as output buffer.
868+
If not passed, a new array will be created.
860869
861870
Returns
862871
-------
@@ -961,7 +970,8 @@ def alpha_beta(returns,
961970
returns into annual returns. Value should be the annual frequency of
962971
`returns`.
963972
out : array-like, optional
964-
The array to store the store the output.
973+
Array to use as output buffer.
974+
If not passed, a new array will be created.
965975
966976
Returns
967977
-------
@@ -993,7 +1003,8 @@ def roll_alpha_beta(returns, factor_returns, window=10, **kwargs):
9931003
window : int
9941004
Size of the rolling window in terms of the periodicity of the data.
9951005
out : array-like, optional
996-
The array to store the store the output.
1006+
Array to use as output buffer.
1007+
If not passed, a new array will be created.
9971008
**kwargs
9981009
Forwarded to :func:`~empyrical.alpha_beta`.
9991010
"""
@@ -1045,7 +1056,8 @@ def alpha_beta_aligned(returns,
10451056
returns into annual returns. Value should be the annual frequency of
10461057
`returns`.
10471058
out : array-like, optional
1048-
The array to store the store the output.
1059+
Array to use as output buffer.
1060+
If not passed, a new array will be created.
10491061
10501062
Returns
10511063
-------
@@ -1113,7 +1125,8 @@ def alpha(returns,
11131125
The beta for the given inputs, if already known. Will be calculated
11141126
internally if not provided.
11151127
out : array-like, optional
1116-
The array to store the store the output.
1128+
Array to use as output buffer.
1129+
If not passed, a new array will be created.
11171130
11181131
Returns
11191132
-------
@@ -1181,7 +1194,8 @@ def alpha_aligned(returns,
11811194
The beta for the given inputs, if already known. Will be calculated
11821195
internally if not provided.
11831196
out : array-like, optional
1184-
The array to store the store the output.
1197+
Array to use as output buffer.
1198+
If not passed, a new array will be created.
11851199
11861200
Returns
11871201
-------
@@ -1240,7 +1254,8 @@ def beta(returns, factor_returns, risk_free=0.0, out=None):
12401254
Constant risk-free return throughout the period. For example, the
12411255
interest rate on a three month us treasury bill.
12421256
out : array-like, optional
1243-
The array to store the store the output.
1257+
Array to use as output buffer.
1258+
If not passed, a new array will be created.
12441259
12451260
Returns
12461261
-------
@@ -1281,7 +1296,8 @@ def beta_aligned(returns, factor_returns, risk_free=0.0, out=None):
12811296
Constant risk-free return throughout the period. For example, the
12821297
interest rate on a three month us treasury bill.
12831298
out : array-like, optional
1284-
The array to store the store the output.
1299+
Array to use as output buffer.
1300+
If not passed, a new array will be created.
12851301
12861302
Returns
12871303
-------

0 commit comments

Comments
 (0)