midas-client 1.0.23

A Python client library to access the midas_server backend.
Documentation
{
  "metadata": {
    "backtest_id": 123,
    "backtest_name": "testing76543",
    "parameters": {
      "strategy_name": "cointegrationzscore",
      "capital": 100000,
      "schema": "mbp-1",
      "data_type": "BAR",
      "start": 1704862800,
      "end": 1704893000,
      "tickers": ["AAPL"]
    },
    "static_stats": {
      "total_trades": 153,
      "total_winning_trades": 83,
      "total_losing_trades": 70,
      "avg_profit": 7034166,
      "avg_profit_percent": 44286,
      "avg_gain": 546316735,
      "avg_gain_percent": 44286,
      "avg_loss": -494028786,
      "avg_loss_percent": 23,
      "profitability_ratio": 5425,
      "profit_factor": 13112,
      "profit_and_loss_ratio": 11058,
      "total_fees": -2601,
      "net_profit": 42774,
      "beginning_equity": 10000000,
      "ending_equity": 10042774,
      "total_return": 4277,
      "annualized_return": 4277,
      "daily_standard_deviation_percentage": 4261882,
      "annual_standard_deviation_percentage": 67655276,
      "max_drawdown_percentage_period": -13609,
      "max_drawdown_percentage_daily": -1270,
      "sharpe_ratio": 6771709,
      "sortino_ratio": 13604839
    }
  },
  "period_timeseries_stats": [
    {
      "timestamp": 1704903000,
      "equity_value": 10000,
      "percent_drawdown": 99,
      "cumulative_return": -9,
      "period_return": 79,
      "daily_strategy_return": "0.330",
      "daily_benchmark_return": "0.00499"
    },
    {
      "timestamp": 1704904000,
      "equity_value": 100000,
      "percent_drawdown": 99,
      "cumulative_return": -9,
      "period_return": 799,
      "daily_strategy_return": "0.087",
      "daily_benchmark_return": "0.009"
    }
  ],
  "daily_timeseries_stats": [
    {
      "timestamp": 1704903000,
      "equity_value": 100000,
      "percent_drawdown": 99,
      "cumulative_return": -9,
      "period_return": 799,
      "daily_strategy_return": "0.330",
      "daily_benchmark_return": "0.00499"
    },
    {
      "timestamp": 1704904000,
      "equity_value": 100000,
      "percent_drawdown": 99,
      "cumulative_return": -9,
      "period_return": 799,
      "daily_strategy_return": "0.087",
      "daily_benchmark_return": "0.009"
    }
  ],
  "trades": [
    {
      "trade_id": 1,
      "signal_id": 1,
      "timestamp": 1704903000,
      "ticker": "AAPL",
      "quantity": 4,
      "avg_price": 13074,
      "trade_value": -52296,
      "trade_cost": -52296,
      "action": "BUY",
      "fees": 12
    }
  ],
  "signals": [
    {
      "timestamp": 1704903000,
      "trade_instructions": [
        {
          "ticker": "AAPL",
          "order_type": "MKT",
          "action": "BUY",
          "signal_id": 1,
          "weight": 50,
          "quantity": 2343,
          "limit_price": "",
          "aux_price": ""
        },
        {
          "ticker": "MSFT",
          "order_type": "LMT",
          "action": "SELL",
          "signal_id": 1,
          "weight": 5,
          "quantity": 2343,
          "limit_price": "-1",
          "aux_price": "-1"
        }
      ]
    }
  ]
}