pub struct BacktestMetrics {Show 15 fields
pub total_return: f64,
pub annual_return: f64,
pub sharpe_ratio: f64,
pub sortino_ratio: f64,
pub max_drawdown: f64,
pub win_rate: f64,
pub profit_factor: f64,
pub total_trades: u32,
pub winning_trades: u32,
pub losing_trades: u32,
pub avg_win: f64,
pub avg_loss: f64,
pub largest_win: f64,
pub largest_loss: f64,
pub final_equity: f64,
}Expand description
Backtest performance metrics
Fields§
§total_return: f64§annual_return: f64§sharpe_ratio: f64§sortino_ratio: f64§max_drawdown: f64§win_rate: f64§profit_factor: f64§total_trades: u32§winning_trades: u32§losing_trades: u32§avg_win: f64§avg_loss: f64§largest_win: f64§largest_loss: f64§final_equity: f64Trait Implementations§
Source§impl FromNapiValue for BacktestMetrics
impl FromNapiValue for BacktestMetrics
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ToNapiValue for BacktestMetrics
impl ToNapiValue for BacktestMetrics
Source§unsafe fn to_napi_value(
env: napi_env,
val: BacktestMetrics,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: BacktestMetrics, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for BacktestMetrics
impl TypeName for BacktestMetrics
Source§impl ValidateNapiValue for BacktestMetrics
impl ValidateNapiValue for BacktestMetrics
Source§unsafe fn validate(
env: *mut napi_env__,
napi_val: *mut napi_value__,
) -> Result<*mut napi_value__, Error>
unsafe fn validate( env: *mut napi_env__, napi_val: *mut napi_value__, ) -> Result<*mut napi_value__, Error>
Safety Read more
Auto Trait Implementations§
impl Freeze for BacktestMetrics
impl RefUnwindSafe for BacktestMetrics
impl Send for BacktestMetrics
impl Sync for BacktestMetrics
impl Unpin for BacktestMetrics
impl UnwindSafe for BacktestMetrics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more