@@ -1520,7 +1520,7 @@ def plot_capacity_sweep(returns, transactions, market_data,
15201520 return ax
15211521
15221522
1523- def plot_daily_turnover_hist (transactions , positions ,
1523+ def plot_daily_turnover_hist (transactions , positions , turnover_denom = 'AGB' ,
15241524 ax = None , ** kwargs ):
15251525 """
15261526 Plots a histogram of daily turnover rates.
@@ -1533,6 +1533,9 @@ def plot_daily_turnover_hist(transactions, positions,
15331533 positions : pd.DataFrame
15341534 Daily net position values.
15351535 - See full explanation in tears.create_full_tear_sheet.
1536+ turnover_denom : str, optional
1537+ Either AGB or portfolio_value, default AGB.
1538+ - See full explanation in txn.get_turnover.
15361539 ax : matplotlib.Axes, optional
15371540 Axes upon which to plot.
15381541 **kwargs, optional
@@ -1546,7 +1549,7 @@ def plot_daily_turnover_hist(transactions, positions,
15461549
15471550 if ax is None :
15481551 ax = plt .gca ()
1549- turnover = txn .get_turnover (positions , transactions )
1552+ turnover = txn .get_turnover (positions , transactions , turnover_denom )
15501553 sns .distplot (turnover , ax = ax , ** kwargs )
15511554 ax .set_title ('Distribution of daily turnover rates' )
15521555 ax .set_xlabel ('Turnover rate' )
0 commit comments