📦 SQA::Backtest::Results¶
Description
Represents the results of a backtest
🔨 Instance Methods¶
#total_return()¶
Returns the value of attribute total_return.
Source Location
#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
#annualized_return()¶
Returns the value of attribute annualized_return.
Source Location
#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
#sharpe_ratio()¶
Returns the value of attribute sharpe_ratio.
Source Location
#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
#max_drawdown()¶
Returns the value of attribute max_drawdown.
Source Location
#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
#total_trades()¶
Returns the value of attribute total_trades.
Source Location
#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
#winning_trades()¶
Returns the value of attribute winning_trades.
Source Location
#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
#losing_trades()¶
Returns the value of attribute losing_trades.
Source Location
#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
#win_rate()¶
Returns the value of attribute win_rate.
Source Location
#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
#average_win()¶
Returns the value of attribute average_win.
Source Location
#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
#average_loss()¶
Returns the value of attribute average_loss.
Source Location
#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
#profit_factor()¶
Returns the value of attribute profit_factor.
Source Location
#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
#start_date()¶
Returns the value of attribute start_date.
Source Location
#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
#end_date()¶
Returns the value of attribute end_date.
Source Location
#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
#initial_capital()¶
Returns the value of attribute initial_capital.
Source Location
#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
#final_value()¶
Returns the value of attribute final_value.
Source Location
#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
#initialize()¶
Returns
Type: Results
a new instance of Results
Source Location
#to_h()¶
Source Location
#summary()¶
Source Location
📝 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.