render_weight_series_table#

API documentation for tradeexecutor.analysis.weights.render_weight_series_table Python function.

render_weight_series_table(weights_series)[source]#

Render the weight series in human readable format.

  • Each row is a timestamp

  • All assets are columns, representing USD allocation of the asset for the timestamp

Example:

from tradeexecutor.analysis.weights import calculate_asset_weights, visualise_weights, render_weight_series_table

weights_series = calculate_asset_weights(state)

with pd.option_context('display.max_rows', None):
    df = render_weight_series_table(weights_series)
    display(df)
Parameters:

weights_series (Series) –

Return type:

DataFrame