Skip to content

📦 SQA::Backtest::Results

Description

Represents the results of a backtest

Source Information

Defined in: lib/sqa/backtest.rb:11

Inherits from: Object

🔨 Instance Methods

#total_return()

Returns the value of attribute total_return.

Source Location

lib/sqa/backtest.rb:12


#total_return=(value)

Sets the attribute total_return

Parameters

Name Type Description
value Any the value to set the attribute total_return to.
Source Location

lib/sqa/backtest.rb:12


#annualized_return()

Returns the value of attribute annualized_return.

Source Location

lib/sqa/backtest.rb:12


#annualized_return=(value)

Sets the attribute annualized_return

Parameters

Name Type Description
value Any the value to set the attribute annualized_return to.
Source Location

lib/sqa/backtest.rb:12


#sharpe_ratio()

Returns the value of attribute sharpe_ratio.

Source Location

lib/sqa/backtest.rb:12


#sharpe_ratio=(value)

Sets the attribute sharpe_ratio

Parameters

Name Type Description
value Any the value to set the attribute sharpe_ratio to.
Source Location

lib/sqa/backtest.rb:12


#max_drawdown()

Returns the value of attribute max_drawdown.

Source Location

lib/sqa/backtest.rb:12


#max_drawdown=(value)

Sets the attribute max_drawdown

Parameters

Name Type Description
value Any the value to set the attribute max_drawdown to.
Source Location

lib/sqa/backtest.rb:12


#total_trades()

Returns the value of attribute total_trades.

Source Location

lib/sqa/backtest.rb:12


#total_trades=(value)

Sets the attribute total_trades

Parameters

Name Type Description
value Any the value to set the attribute total_trades to.
Source Location

lib/sqa/backtest.rb:12


#winning_trades()

Returns the value of attribute winning_trades.

Source Location

lib/sqa/backtest.rb:12


#winning_trades=(value)

Sets the attribute winning_trades

Parameters

Name Type Description
value Any the value to set the attribute winning_trades to.
Source Location

lib/sqa/backtest.rb:12


#losing_trades()

Returns the value of attribute losing_trades.

Source Location

lib/sqa/backtest.rb:12


#losing_trades=(value)

Sets the attribute losing_trades

Parameters

Name Type Description
value Any the value to set the attribute losing_trades to.
Source Location

lib/sqa/backtest.rb:12


#win_rate()

Returns the value of attribute win_rate.

Source Location

lib/sqa/backtest.rb:12


#win_rate=(value)

Sets the attribute win_rate

Parameters

Name Type Description
value Any the value to set the attribute win_rate to.
Source Location

lib/sqa/backtest.rb:12


#average_win()

Returns the value of attribute average_win.

Source Location

lib/sqa/backtest.rb:12


#average_win=(value)

Sets the attribute average_win

Parameters

Name Type Description
value Any the value to set the attribute average_win to.
Source Location

lib/sqa/backtest.rb:12


#average_loss()

Returns the value of attribute average_loss.

Source Location

lib/sqa/backtest.rb:12


#average_loss=(value)

Sets the attribute average_loss

Parameters

Name Type Description
value Any the value to set the attribute average_loss to.
Source Location

lib/sqa/backtest.rb:12


#profit_factor()

Returns the value of attribute profit_factor.

Source Location

lib/sqa/backtest.rb:12


#profit_factor=(value)

Sets the attribute profit_factor

Parameters

Name Type Description
value Any the value to set the attribute profit_factor to.
Source Location

lib/sqa/backtest.rb:12


#start_date()

Returns the value of attribute start_date.

Source Location

lib/sqa/backtest.rb:12


#start_date=(value)

Sets the attribute start_date

Parameters

Name Type Description
value Any the value to set the attribute start_date to.
Source Location

lib/sqa/backtest.rb:12


#end_date()

Returns the value of attribute end_date.

Source Location

lib/sqa/backtest.rb:12


#end_date=(value)

Sets the attribute end_date

Parameters

Name Type Description
value Any the value to set the attribute end_date to.
Source Location

lib/sqa/backtest.rb:12


#initial_capital()

Returns the value of attribute initial_capital.

Source Location

lib/sqa/backtest.rb:12


#initial_capital=(value)

Sets the attribute initial_capital

Parameters

Name Type Description
value Any the value to set the attribute initial_capital to.
Source Location

lib/sqa/backtest.rb:12


#final_value()

Returns the value of attribute final_value.

Source Location

lib/sqa/backtest.rb:12


#final_value=(value)

Sets the attribute final_value

Parameters

Name Type Description
value Any the value to set the attribute final_value to.
Source Location

lib/sqa/backtest.rb:12


#initialize()

Returns

Type: Results

a new instance of Results

Source Location

lib/sqa/backtest.rb:17


#to_h()

Source Location

lib/sqa/backtest.rb:31


#summary()

Source Location

lib/sqa/backtest.rb:51


📝 Attributes

🔄 total_return read/write

Returns the value of attribute total_return.

🔄 annualized_return read/write

Returns the value of attribute annualized_return.

🔄 sharpe_ratio read/write

Returns the value of attribute sharpe_ratio.

🔄 max_drawdown read/write

Returns the value of attribute max_drawdown.

🔄 total_trades read/write

Returns the value of attribute total_trades.

🔄 winning_trades read/write

Returns the value of attribute winning_trades.

🔄 losing_trades read/write

Returns the value of attribute losing_trades.

🔄 win_rate read/write

Returns the value of attribute win_rate.

🔄 average_win read/write

Returns the value of attribute average_win.

🔄 average_loss read/write

Returns the value of attribute average_loss.

🔄 profit_factor read/write

Returns the value of attribute profit_factor.

🔄 start_date read/write

Returns the value of attribute start_date.

🔄 end_date read/write

Returns the value of attribute end_date.

🔄 initial_capital read/write

Returns the value of attribute initial_capital.

🔄 final_value read/write

Returns the value of attribute final_value.