def record_vars2(context, data): """ se obtiene el la relacion entre mensajes relacionados con el alza, sobre el total de mensajes """ context.datos_test = algo.pipeline_output('cantidadTweets') algo.record(por_mensajes_alza=len(context.datos_test))
def record_vars(context, data): """ Plot variables at the end of each day. """ record( leverage=context.account.leverage, hold_out_accuracy=context.hold_out_accuracy, hold_out_log_loss=context.hold_out_log_loss, hold_out_returns_spread_bps=context.hold_out_returns_spread_bps, )
def record_vars(context, data): """ A function scheduled to run every day at market close in order to record strategy information. Parameters ---------- context : AlgorithmContext See description above. data : BarData See description above. """ # Plot the number of positions over time. algo.record(num_positions=len(context.portfolio.positions))
def record_vars(context, data): """ initalize関数内部で定義した、scedule_functionによって毎営業日終了後に呼び出される 関数 Parameters ---------- context : AlgorithmContext See description above. data : BarData See description above. """ # ポートフォリオの構成銘柄数をnum_positionとして記録する algo.record(num_positions=len(context.portfolio.positions))
def record_vars(context, data): """ This function is called at the end of each day and plots certain variables. """ # Check how many long and short positions we have. longs = shorts = 0 for position in context.portfolio.positions.itervalues(): if position.amount > 0: longs += 1 if position.amount < 0: shorts += 1 # Record and plot the leverage of our portfolio over time as well as the # number of long and short positions. Even in minute mode, only the end-of-day # leverage is plotted. algo.record(leverage=context.account.leverage, long_count=longs, short_count=shorts)
def record_vars(context, data): """ Plot variables at the end of each day. """ # Plot the number of positions over time. algo.record(num_positions=len(context.portfolio.positions))
def record_vars(context, data): # Graficar el numero de posiciones en el tiempo algo.record(num_positions=len(context.portfolio.positions))
def record_vars(context, data): algo.record(num_positions=len(context.portfolio.positions))
def record_vars(context, data): # Plot the number of positions over time. algo.record(num_positions=len(context.portfolio.positions))