code: def test_value_at_risk():
      assert abs(value_at_risk(1e2, 0.5, 0.25, 0.95) - 91.12) <= 1e-1
      assert abs(value_at_risk(1e3, 0.8, 0.5, 0.99) - 1963.17) <= 1e-1
      assert abs(value_at_risk(1e4, -0.1, 0.25, 0.9) - 2203.88) <= 1e-1
      assert (
          abs(value_at_risk(1e4, 0.1, -0.25, 0.9) - (-2203.88)) <= 1e-1
      )
      assert (
          abs(value_at_risk(1e4, -0.1, -0.25, 0.9) - (-4203.88)) <= 1e-1
      )
      assert value_at_risk(0, 0.1, 0.5, 0.9) == 0
      assert abs(value_at_risk(1e4, 0.0, 0.5, 0.9) - 6407.76) <= 1e-1
      assert abs(value_at_risk(1e4, 0.1, 0.0, 0.9) - 1000) <= 1e-1
      assert value_at_risk(1e4, 0.0, 0.0, 0.9) == 0
  
file_path: FinQuant/tests/test_quants.py
imports: import pdb
  import numpy
  import pandas
  import pytest
  from finquant.quants import annualised_portfolio_quantities, downside_risk, sharpe_ratio, sortino_ratio, treynor_ratio, value_at_risk, weighted_mean, weighted_std
label_desc: Use image node_id 6 for calling a global function with example usage: test_value_at_risk() without return types