Learn practical skills, build real-world projects, and advance your career

Company-level: How long does a balance sheet last

  • inputs: real orders placed on June 16/17, 2020

    • turn a certain portion of orders into leveraged type
  • how to determine leverage: maximum leverage (max 20) under constraint that one-day VaR of each order is less than initialequityratio1.02initialequityratio\frac {initial_equity_ratio - 1.02} {initial_equity_ratio} * collateral

  • outputs: how long a size of $X balance sheet lasts

import jovian
jovian.commit()
[jovian] Attempting to save notebook.. [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/alexander/new-company-q1
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

from scipy.stats import bernoulli