diff --git a/Makefile b/Makefile index ddaed51..ce861b5 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,3 @@ - -debug: - RUST_BACKTRACE=1 cargo run backtest --symbol ${symbol} - backtest: cargo run backtest --symbol ${symbol} diff --git a/src/cmds/backtest.rs b/src/cmds/backtest.rs index afea483..48f5753 100644 --- a/src/cmds/backtest.rs +++ b/src/cmds/backtest.rs @@ -1,20 +1,21 @@ -use std::fs; +use std::{ + fs, + process::exit +}; +use super::Command; use anyhow::{Result}; use clap::{Arg, ArgMatches, Command as ClapCommand}; use serde_derive::{Deserialize, Serialize}; -use super::Command; -use std::process::exit; use clickhouse::{ Client, Row}; use async_trait::async_trait; use time::Date; -use crate::green::{Green, feeds, strategy}; -use crate::green::feeds::BaseData; +use crate::green::{ + Green, feeds, strategy, +}; use crate::strategy::hold::BuyAndHold; - pub struct BackTestCommand; - #[async_trait] impl Command for BackTestCommand { fn usage() -> ClapCommand {