Esempio n. 1
0
def stochastic_volatility_sp500_small():
    """Stochastic volatility model.

  This is a smaller version of `stochastic_volatility_model_sp500` using only
  100 days of returns from the S&P 500, ending 6/24/2020.

  Returns:
    target: StanModel.
  """
    dataset = data.sp500_closing_prices(num_points=100)
    return stochastic_volatility.stochastic_volatility(**dataset)
Esempio n. 2
0
def stochastic_volatility_sp500():
    """Stochastic volatility model.

  This uses a dataset of 2517 daily closing prices of the S&P 500 index,
  representing the time period 6/25/2010-6/24/2020.

  Returns:
    target: StanModel.
  """
    dataset = data.sp500_closing_prices()
    return stochastic_volatility.stochastic_volatility(**dataset)