RustyQLib 0.0.3

RustyQLib is a lightweight yet robust quantitative finance library designed to price derivatives and perform risk analysis
Documentation
{
  "asset": "EQ",
  "contracts": [
    {
      "action": "PV",
      "asset": "EQ",
      "product_type": {
        "product_type": "option",
        "symbol": "ABC",
        "underlying_price": 100.0,
        "put_or_call": "C",
        "payoff_type": "vanilla",
        "strike_price": 100.0,
        "volatility": 0.4,
        "maturity": "2027-03-31",
        "dividend": 0.01,
        "risk_free_rate": 0.06,
        "exercise_style": "European",
        "pricer": "Analytical"
      }
    },
    {
      "action": "PV",
      "asset": "EQ",
      "product_type": {
        "product_type": "option",
        "symbol": "ABC",
        "underlying_price": 100.0,
        "put_or_call": "P",
        "payoff_type": "vanilla",
        "strike_price": 100.0,
        "maturity": "2027-03-31",
        "dividend": 0.01,
        "exercise_style": "European",
        "pricer": "Analytical",
        "discount_curve": {
          "type": "zero_rates",
          "tenors": [0.25, 0.5, 1.0, "2028-03-31"],
          "rates": [0.045, 0.05, 0.055, 0.06],
          "compounding": "continuous",
          "day_count": "Act365"
        },
        "vol_surface": {
          "type": "strike_expiry",
          "expiries": [0.25, 1.0, 2.0],
          "strikes": [80.0, 90.0, 100.0, 110.0, 120.0],
          "vols": [
            [0.46, 0.43, 0.40, 0.38, 0.37],
            [0.44, 0.42, 0.40, 0.39, 0.38],
            [0.43, 0.41, 0.40, 0.39, 0.39]
          ],
          "day_count": "Act365"
        }
      }
    },
    {
      "action": "PV",
      "asset": "EQ",
      "product_type": {
        "product_type": "future",
        "symbol": "ABC",
        "underlying_price": 100.0,
        "current_price": 104.0,
        "risk_free_rate": 0.06,
        "maturity": "2027-03-31",
        "dividend": 0.01
      }
    }
  ]
}