Copy disabled (too large)
Download .txt
Showing preview only (25,897K chars total). Download the full file to get everything.
Repository: goldmansachs/gs-quant
Branch: master
Commit: e43334038e60
Files: 1679
Total size: 24.4 MB
Directory structure:
gitextract_7xksykym/
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows/
│ └── python-publish.yml
├── .gitignore
├── .gitlab-ci.yml
├── .gs-project.yml
├── .pre-commit-config.yaml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── NOTICE
├── NOTICE.txt
├── README.md
├── SKILL.md
├── conftest.py
├── dco/
│ ├── Bryan Galindo.dco
│ ├── Grant McGovern.dco
│ ├── Maverick Lin.dco
│ └── Scott Weinstein.dco
├── docs/
│ ├── Makefile
│ ├── README.md
│ ├── _build/
│ │ ├── doctrees/
│ │ │ ├── classes/
│ │ │ │ ├── gs_quant.base.Priceable.doctree
│ │ │ │ ├── gs_quant.data.DataContext.doctree
│ │ │ │ ├── gs_quant.data.Dataset.doctree
│ │ │ │ ├── gs_quant.data.Fields.doctree
│ │ │ │ ├── gs_quant.instrument.CommodOTCSwap.doctree
│ │ │ │ ├── gs_quant.instrument.CommodSwap.doctree
│ │ │ │ ├── gs_quant.instrument.EqCliquet.doctree
│ │ │ │ ├── gs_quant.instrument.EqForward.doctree
│ │ │ │ ├── gs_quant.instrument.EqOption.doctree
│ │ │ │ ├── gs_quant.instrument.EqSynthetic.doctree
│ │ │ │ ├── gs_quant.instrument.EqVarianceSwap.doctree
│ │ │ │ ├── gs_quant.instrument.FXBinary.doctree
│ │ │ │ ├── gs_quant.instrument.FXForward.doctree
│ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinary.doctree
│ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.doctree
│ │ │ │ ├── gs_quant.instrument.FXOption.doctree
│ │ │ │ ├── gs_quant.instrument.FXVolatilitySwap.doctree
│ │ │ │ ├── gs_quant.instrument.Forward.doctree
│ │ │ │ ├── gs_quant.instrument.IRBasisSwap.doctree
│ │ │ │ ├── gs_quant.instrument.IRCMSOption.doctree
│ │ │ │ ├── gs_quant.instrument.IRCMSOptionStrip.doctree
│ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOption.doctree
│ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.doctree
│ │ │ │ ├── gs_quant.instrument.IRCap.doctree
│ │ │ │ ├── gs_quant.instrument.IRFloor.doctree
│ │ │ │ ├── gs_quant.instrument.IRSwap.doctree
│ │ │ │ ├── gs_quant.instrument.IRSwaption.doctree
│ │ │ │ ├── gs_quant.instrument.IRXccySwap.doctree
│ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFix.doctree
│ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.doctree
│ │ │ │ ├── gs_quant.instrument.InflationSwap.doctree
│ │ │ │ ├── gs_quant.instrument.Security.doctree
│ │ │ │ ├── gs_quant.markets.HistoricalPricingContext.doctree
│ │ │ │ ├── gs_quant.markets.PricingContext.doctree
│ │ │ │ ├── gs_quant.markets.portfolio.Portfolio.doctree
│ │ │ │ ├── gs_quant.markets.securities.Asset.doctree
│ │ │ │ ├── gs_quant.markets.securities.AssetClass.doctree
│ │ │ │ ├── gs_quant.markets.securities.AssetIdentifier.doctree
│ │ │ │ ├── gs_quant.markets.securities.AssetType.doctree
│ │ │ │ ├── gs_quant.markets.securities.Index.doctree
│ │ │ │ ├── gs_quant.markets.securities.SecurityMaster.doctree
│ │ │ │ ├── gs_quant.markets.securities.Stock.doctree
│ │ │ │ ├── gs_quant.models.epidemiology.EpidemicModel.doctree
│ │ │ │ ├── gs_quant.models.epidemiology.SEIR.doctree
│ │ │ │ ├── gs_quant.models.epidemiology.SIR.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.Window.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.LinearRegression.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.SEIRModel.doctree
│ │ │ │ └── gs_quant.timeseries.statistics.SIRModel.doctree
│ │ │ ├── data.doctree
│ │ │ ├── datetime.doctree
│ │ │ ├── environment.pickle
│ │ │ ├── functions/
│ │ │ │ ├── gs_quant.datetime.date.business_day_count.doctree
│ │ │ │ ├── gs_quant.datetime.date.business_day_offset.doctree
│ │ │ │ ├── gs_quant.datetime.date.date_range.doctree
│ │ │ │ ├── gs_quant.datetime.date.is_business_day.doctree
│ │ │ │ ├── gs_quant.datetime.date.prev_business_date.doctree
│ │ │ │ ├── gs_quant.datetime.point.point_sort_order.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.abs_.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.add.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.and_.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.ceil.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.divide.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.exp.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.filter_.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.floor.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.floordiv.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.if_.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.log.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.multiply.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.not_.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.or_.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.power.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.repeat.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.smooth_spikes.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.sqrt.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.subtract.doctree
│ │ │ │ ├── gs_quant.timeseries.algebra.weighted_sum.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.count.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.diff.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.first.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.lag.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.last.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.last_value.doctree
│ │ │ │ ├── gs_quant.timeseries.analysis.weighted_sum.doctree
│ │ │ │ ├── gs_quant.timeseries.backtesting.basket.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.align.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.date_range.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.day.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.interpolate.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.month.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.prepend.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.quarter.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.union.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.value.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.weekday.doctree
│ │ │ │ ├── gs_quant.timeseries.datetime.year.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.annualize.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.beta.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.change.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.correlation.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.index.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.prices.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.returns.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.doctree
│ │ │ │ ├── gs_quant.timeseries.econometrics.volatility.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.cov.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.exponential_std.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.generate_series.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.max_.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.mean.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.median.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.min_.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.mode.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.percentile.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.percentiles.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.product.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.range_.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.std.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.sum_.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.var.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.winsorize.doctree
│ │ │ │ ├── gs_quant.timeseries.statistics.zscores.doctree
│ │ │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.doctree
│ │ │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.doctree
│ │ │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.doctree
│ │ │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.doctree
│ │ │ │ ├── gs_quant.timeseries.technicals.moving_average.doctree
│ │ │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.doctree
│ │ │ │ └── gs_quant.timeseries.technicals.smoothed_moving_average.doctree
│ │ │ ├── index.doctree
│ │ │ ├── instrument.doctree
│ │ │ ├── market.doctree
│ │ │ ├── markets.doctree
│ │ │ ├── models.doctree
│ │ │ ├── risk.doctree
│ │ │ └── timeseries.doctree
│ │ ├── html/
│ │ │ ├── .buildinfo
│ │ │ ├── _modules/
│ │ │ │ ├── aenum.html
│ │ │ │ ├── gs_quant/
│ │ │ │ │ ├── base.html
│ │ │ │ │ ├── data/
│ │ │ │ │ │ ├── core.html
│ │ │ │ │ │ ├── dataset.html
│ │ │ │ │ │ └── fields.html
│ │ │ │ │ ├── datetime/
│ │ │ │ │ │ ├── date.html
│ │ │ │ │ │ └── point.html
│ │ │ │ │ ├── instrument/
│ │ │ │ │ │ └── core.html
│ │ │ │ │ ├── markets/
│ │ │ │ │ │ ├── core.html
│ │ │ │ │ │ ├── historical.html
│ │ │ │ │ │ ├── portfolio.html
│ │ │ │ │ │ └── securities.html
│ │ │ │ │ ├── models/
│ │ │ │ │ │ └── epidemiology.html
│ │ │ │ │ ├── risk/
│ │ │ │ │ │ ├── core.html
│ │ │ │ │ │ └── measures.html
│ │ │ │ │ ├── target/
│ │ │ │ │ │ ├── common.html
│ │ │ │ │ │ └── instrument.html
│ │ │ │ │ └── timeseries/
│ │ │ │ │ ├── algebra.html
│ │ │ │ │ ├── analysis.html
│ │ │ │ │ ├── backtesting.html
│ │ │ │ │ ├── datetime.html
│ │ │ │ │ ├── econometrics.html
│ │ │ │ │ ├── helper.html
│ │ │ │ │ ├── statistics.html
│ │ │ │ │ └── technicals.html
│ │ │ │ └── index.html
│ │ │ ├── _sources/
│ │ │ │ ├── classes/
│ │ │ │ │ ├── gs_quant.base.Priceable.rst.txt
│ │ │ │ │ ├── gs_quant.data.DataContext.rst.txt
│ │ │ │ │ ├── gs_quant.data.Dataset.rst.txt
│ │ │ │ │ ├── gs_quant.data.Fields.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.CommodOTCSwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.CommodSwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.EqCliquet.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.EqForward.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.EqOption.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.EqSynthetic.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.EqVarianceSwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.FXBinary.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.FXForward.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinary.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.FXOption.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.FXVolatilitySwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.Forward.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRBasisSwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRCMSOption.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRCMSOptionStrip.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOption.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRCap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRFloor.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRSwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRSwaption.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRXccySwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFix.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.InflationSwap.rst.txt
│ │ │ │ │ ├── gs_quant.instrument.Security.rst.txt
│ │ │ │ │ ├── gs_quant.markets.HistoricalPricingContext.rst.txt
│ │ │ │ │ ├── gs_quant.markets.PricingContext.rst.txt
│ │ │ │ │ ├── gs_quant.markets.portfolio.Portfolio.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.Asset.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.AssetClass.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.AssetIdentifier.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.AssetType.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.Index.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.SecurityMaster.rst.txt
│ │ │ │ │ ├── gs_quant.markets.securities.Stock.rst.txt
│ │ │ │ │ ├── gs_quant.models.epidemiology.EpidemicModel.rst.txt
│ │ │ │ │ ├── gs_quant.models.epidemiology.SEIR.rst.txt
│ │ │ │ │ ├── gs_quant.models.epidemiology.SIR.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.Window.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.LinearRegression.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.SEIRModel.rst.txt
│ │ │ │ │ └── gs_quant.timeseries.statistics.SIRModel.rst.txt
│ │ │ │ ├── data.rst.txt
│ │ │ │ ├── datetime.rst.txt
│ │ │ │ ├── functions/
│ │ │ │ │ ├── gs_quant.datetime.date.business_day_count.rst.txt
│ │ │ │ │ ├── gs_quant.datetime.date.business_day_offset.rst.txt
│ │ │ │ │ ├── gs_quant.datetime.date.date_range.rst.txt
│ │ │ │ │ ├── gs_quant.datetime.date.is_business_day.rst.txt
│ │ │ │ │ ├── gs_quant.datetime.date.prev_business_date.rst.txt
│ │ │ │ │ ├── gs_quant.datetime.point.point_sort_order.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.abs_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.add.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.and_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.ceil.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.divide.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.exp.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.filter_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.floor.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.floordiv.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.if_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.log.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.multiply.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.not_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.or_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.power.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.repeat.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.smooth_spikes.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.sqrt.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.subtract.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.algebra.weighted_sum.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.count.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.diff.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.first.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.lag.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.last.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.last_value.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.analysis.weighted_sum.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.backtesting.basket.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.align.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.date_range.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.day.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.interpolate.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.month.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.prepend.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.quarter.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.union.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.value.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.weekday.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.datetime.year.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.annualize.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.beta.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.change.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.correlation.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.index.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.prices.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.returns.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.econometrics.volatility.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.cov.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.exponential_std.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.generate_series.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.max_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.mean.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.median.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.min_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.mode.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.percentile.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.percentiles.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.product.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.range_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.std.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.sum_.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.var.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.winsorize.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.statistics.zscores.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.technicals.moving_average.rst.txt
│ │ │ │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.rst.txt
│ │ │ │ │ └── gs_quant.timeseries.technicals.smoothed_moving_average.rst.txt
│ │ │ │ ├── index.rst.txt
│ │ │ │ ├── instrument.rst.txt
│ │ │ │ ├── market.rst.txt
│ │ │ │ ├── markets.rst.txt
│ │ │ │ ├── models.rst.txt
│ │ │ │ ├── risk.rst.txt
│ │ │ │ └── timeseries.rst.txt
│ │ │ ├── _static/
│ │ │ │ ├── basic.css
│ │ │ │ ├── css/
│ │ │ │ │ └── theme.css
│ │ │ │ ├── doctools.js
│ │ │ │ ├── documentation_options.js
│ │ │ │ ├── jquery-3.5.1.js
│ │ │ │ ├── jquery.js
│ │ │ │ ├── js/
│ │ │ │ │ └── theme.js
│ │ │ │ ├── language_data.js
│ │ │ │ ├── pygments.css
│ │ │ │ ├── searchtools.js
│ │ │ │ ├── underscore-1.3.1.js
│ │ │ │ └── underscore.js
│ │ │ ├── classes/
│ │ │ │ ├── gs_quant.base.Priceable.html
│ │ │ │ ├── gs_quant.data.DataContext.html
│ │ │ │ ├── gs_quant.data.Dataset.html
│ │ │ │ ├── gs_quant.data.Fields.html
│ │ │ │ ├── gs_quant.instrument.CommodOTCSwap.html
│ │ │ │ ├── gs_quant.instrument.CommodSwap.html
│ │ │ │ ├── gs_quant.instrument.EqCliquet.html
│ │ │ │ ├── gs_quant.instrument.EqForward.html
│ │ │ │ ├── gs_quant.instrument.EqOption.html
│ │ │ │ ├── gs_quant.instrument.EqSynthetic.html
│ │ │ │ ├── gs_quant.instrument.EqVarianceSwap.html
│ │ │ │ ├── gs_quant.instrument.FXBinary.html
│ │ │ │ ├── gs_quant.instrument.FXForward.html
│ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinary.html
│ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.html
│ │ │ │ ├── gs_quant.instrument.FXOption.html
│ │ │ │ ├── gs_quant.instrument.FXVolatilitySwap.html
│ │ │ │ ├── gs_quant.instrument.Forward.html
│ │ │ │ ├── gs_quant.instrument.IRBasisSwap.html
│ │ │ │ ├── gs_quant.instrument.IRCMSOption.html
│ │ │ │ ├── gs_quant.instrument.IRCMSOptionStrip.html
│ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOption.html
│ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.html
│ │ │ │ ├── gs_quant.instrument.IRCap.html
│ │ │ │ ├── gs_quant.instrument.IRFloor.html
│ │ │ │ ├── gs_quant.instrument.IRSwap.html
│ │ │ │ ├── gs_quant.instrument.IRSwaption.html
│ │ │ │ ├── gs_quant.instrument.IRXccySwap.html
│ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFix.html
│ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.html
│ │ │ │ ├── gs_quant.instrument.InflationSwap.html
│ │ │ │ ├── gs_quant.instrument.Security.html
│ │ │ │ ├── gs_quant.markets.HistoricalPricingContext.html
│ │ │ │ ├── gs_quant.markets.PricingContext.html
│ │ │ │ ├── gs_quant.markets.portfolio.Portfolio.html
│ │ │ │ ├── gs_quant.markets.securities.Asset.html
│ │ │ │ ├── gs_quant.markets.securities.AssetClass.html
│ │ │ │ ├── gs_quant.markets.securities.AssetIdentifier.html
│ │ │ │ ├── gs_quant.markets.securities.AssetType.html
│ │ │ │ ├── gs_quant.markets.securities.Index.html
│ │ │ │ ├── gs_quant.markets.securities.SecurityMaster.html
│ │ │ │ ├── gs_quant.markets.securities.Stock.html
│ │ │ │ ├── gs_quant.models.epidemiology.EpidemicModel.html
│ │ │ │ ├── gs_quant.models.epidemiology.SEIR.html
│ │ │ │ ├── gs_quant.models.epidemiology.SIR.html
│ │ │ │ ├── gs_quant.timeseries.datetime.Window.html
│ │ │ │ ├── gs_quant.timeseries.statistics.LinearRegression.html
│ │ │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.html
│ │ │ │ ├── gs_quant.timeseries.statistics.SEIRModel.html
│ │ │ │ └── gs_quant.timeseries.statistics.SIRModel.html
│ │ │ ├── data.html
│ │ │ ├── datetime.html
│ │ │ ├── functions/
│ │ │ │ ├── gs_quant.datetime.date.business_day_count.html
│ │ │ │ ├── gs_quant.datetime.date.business_day_offset.html
│ │ │ │ ├── gs_quant.datetime.date.date_range.html
│ │ │ │ ├── gs_quant.datetime.date.is_business_day.html
│ │ │ │ ├── gs_quant.datetime.date.prev_business_date.html
│ │ │ │ ├── gs_quant.datetime.point.point_sort_order.html
│ │ │ │ ├── gs_quant.timeseries.algebra.abs_.html
│ │ │ │ ├── gs_quant.timeseries.algebra.add.html
│ │ │ │ ├── gs_quant.timeseries.algebra.and_.html
│ │ │ │ ├── gs_quant.timeseries.algebra.ceil.html
│ │ │ │ ├── gs_quant.timeseries.algebra.divide.html
│ │ │ │ ├── gs_quant.timeseries.algebra.exp.html
│ │ │ │ ├── gs_quant.timeseries.algebra.filter_.html
│ │ │ │ ├── gs_quant.timeseries.algebra.floor.html
│ │ │ │ ├── gs_quant.timeseries.algebra.floordiv.html
│ │ │ │ ├── gs_quant.timeseries.algebra.if_.html
│ │ │ │ ├── gs_quant.timeseries.algebra.log.html
│ │ │ │ ├── gs_quant.timeseries.algebra.multiply.html
│ │ │ │ ├── gs_quant.timeseries.algebra.not_.html
│ │ │ │ ├── gs_quant.timeseries.algebra.or_.html
│ │ │ │ ├── gs_quant.timeseries.algebra.power.html
│ │ │ │ ├── gs_quant.timeseries.algebra.repeat.html
│ │ │ │ ├── gs_quant.timeseries.algebra.smooth_spikes.html
│ │ │ │ ├── gs_quant.timeseries.algebra.sqrt.html
│ │ │ │ ├── gs_quant.timeseries.algebra.subtract.html
│ │ │ │ ├── gs_quant.timeseries.algebra.weighted_sum.html
│ │ │ │ ├── gs_quant.timeseries.analysis.count.html
│ │ │ │ ├── gs_quant.timeseries.analysis.diff.html
│ │ │ │ ├── gs_quant.timeseries.analysis.first.html
│ │ │ │ ├── gs_quant.timeseries.analysis.lag.html
│ │ │ │ ├── gs_quant.timeseries.analysis.last.html
│ │ │ │ ├── gs_quant.timeseries.analysis.last_value.html
│ │ │ │ ├── gs_quant.timeseries.analysis.weighted_sum.html
│ │ │ │ ├── gs_quant.timeseries.backtesting.basket.html
│ │ │ │ ├── gs_quant.timeseries.datetime.align.html
│ │ │ │ ├── gs_quant.timeseries.datetime.date_range.html
│ │ │ │ ├── gs_quant.timeseries.datetime.day.html
│ │ │ │ ├── gs_quant.timeseries.datetime.interpolate.html
│ │ │ │ ├── gs_quant.timeseries.datetime.month.html
│ │ │ │ ├── gs_quant.timeseries.datetime.prepend.html
│ │ │ │ ├── gs_quant.timeseries.datetime.quarter.html
│ │ │ │ ├── gs_quant.timeseries.datetime.union.html
│ │ │ │ ├── gs_quant.timeseries.datetime.value.html
│ │ │ │ ├── gs_quant.timeseries.datetime.weekday.html
│ │ │ │ ├── gs_quant.timeseries.datetime.year.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.annualize.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.beta.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.change.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.correlation.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.index.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.prices.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.returns.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.html
│ │ │ │ ├── gs_quant.timeseries.econometrics.volatility.html
│ │ │ │ ├── gs_quant.timeseries.statistics.cov.html
│ │ │ │ ├── gs_quant.timeseries.statistics.exponential_std.html
│ │ │ │ ├── gs_quant.timeseries.statistics.generate_series.html
│ │ │ │ ├── gs_quant.timeseries.statistics.max_.html
│ │ │ │ ├── gs_quant.timeseries.statistics.mean.html
│ │ │ │ ├── gs_quant.timeseries.statistics.median.html
│ │ │ │ ├── gs_quant.timeseries.statistics.min_.html
│ │ │ │ ├── gs_quant.timeseries.statistics.mode.html
│ │ │ │ ├── gs_quant.timeseries.statistics.percentile.html
│ │ │ │ ├── gs_quant.timeseries.statistics.percentiles.html
│ │ │ │ ├── gs_quant.timeseries.statistics.product.html
│ │ │ │ ├── gs_quant.timeseries.statistics.range_.html
│ │ │ │ ├── gs_quant.timeseries.statistics.std.html
│ │ │ │ ├── gs_quant.timeseries.statistics.sum_.html
│ │ │ │ ├── gs_quant.timeseries.statistics.var.html
│ │ │ │ ├── gs_quant.timeseries.statistics.winsorize.html
│ │ │ │ ├── gs_quant.timeseries.statistics.zscores.html
│ │ │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.html
│ │ │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.html
│ │ │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.html
│ │ │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.html
│ │ │ │ ├── gs_quant.timeseries.technicals.moving_average.html
│ │ │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.html
│ │ │ │ └── gs_quant.timeseries.technicals.smoothed_moving_average.html
│ │ │ ├── genindex.html
│ │ │ ├── index.html
│ │ │ ├── instrument.html
│ │ │ ├── market.html
│ │ │ ├── markets.html
│ │ │ ├── models.html
│ │ │ ├── objects.inv
│ │ │ ├── risk.html
│ │ │ ├── search.html
│ │ │ ├── searchindex.js
│ │ │ └── timeseries.html
│ │ └── search/
│ │ ├── search-index.json
│ │ └── searchdata.json
│ ├── _templates/
│ │ ├── contexts.rst
│ │ ├── instruments.rst
│ │ ├── models_class.rst
│ │ ├── portfolio_manager.rst
│ │ ├── processors.rst
│ │ ├── report.rst
│ │ └── timeseries_class.rst
│ ├── _themes/
│ │ └── gs/
│ │ ├── LICENSE.txt
│ │ ├── __init__.py
│ │ ├── breadcrumbs.html
│ │ ├── footer.html
│ │ ├── layout.html
│ │ ├── static/
│ │ │ ├── css/
│ │ │ │ └── theme.css
│ │ │ └── js/
│ │ │ └── theme.js
│ │ ├── theme.conf
│ │ └── versions.html
│ ├── analytics.rst
│ ├── classes/
│ │ ├── gs_quant.analytics.datagrid.datagrid.DataGrid.rst
│ │ ├── gs_quant.analytics.processors.AdditionProcessor.rst
│ │ ├── gs_quant.analytics.processors.AppendProcessor.rst
│ │ ├── gs_quant.analytics.processors.ChangeProcessor.rst
│ │ ├── gs_quant.analytics.processors.CoordinateProcessor.rst
│ │ ├── gs_quant.analytics.processors.CorrelationProcessor.rst
│ │ ├── gs_quant.analytics.processors.DivisionProcessor.rst
│ │ ├── gs_quant.analytics.processors.EntityProcessor.rst
│ │ ├── gs_quant.analytics.processors.LastProcessor.rst
│ │ ├── gs_quant.analytics.processors.MultiplicationProcessor.rst
│ │ ├── gs_quant.analytics.processors.PercentilesProcessor.rst
│ │ ├── gs_quant.analytics.processors.ReturnsProcessor.rst
│ │ ├── gs_quant.analytics.processors.SharpeRatioProcessor.rst
│ │ ├── gs_quant.analytics.processors.SubtractionProcessor.rst
│ │ ├── gs_quant.analytics.processors.VolatilityProcessor.rst
│ │ ├── gs_quant.analytics.workspaces.Component.rst
│ │ ├── gs_quant.analytics.workspaces.Workspace.rst
│ │ ├── gs_quant.base.Priceable.rst
│ │ ├── gs_quant.data.DataContext.rst
│ │ ├── gs_quant.data.Dataset.rst
│ │ ├── gs_quant.data.Fields.rst
│ │ ├── gs_quant.data.core.DataContext.rst
│ │ ├── gs_quant.data.dataset.Dataset.rst
│ │ ├── gs_quant.data.fields.Fields.rst
│ │ ├── gs_quant.datetime.relative_date.RelativeDate.rst
│ │ ├── gs_quant.instrument.CommodOTCSwap.rst
│ │ ├── gs_quant.instrument.EqCliquet.rst
│ │ ├── gs_quant.instrument.EqForward.rst
│ │ ├── gs_quant.instrument.EqOption.rst
│ │ ├── gs_quant.instrument.EqSynthetic.rst
│ │ ├── gs_quant.instrument.EqVarianceSwap.rst
│ │ ├── gs_quant.instrument.FXAccumulator.rst
│ │ ├── gs_quant.instrument.FXAccumulatorScheduleLeg.rst
│ │ ├── gs_quant.instrument.FXBinary.rst
│ │ ├── gs_quant.instrument.FXCorrelationSwap.rst
│ │ ├── gs_quant.instrument.FXCorrelationSwapLeg.rst
│ │ ├── gs_quant.instrument.FXDoubleKnockout.rst
│ │ ├── gs_quant.instrument.FXDoubleOneTouch.rst
│ │ ├── gs_quant.instrument.FXDualDoubleKnockout.rst
│ │ ├── gs_quant.instrument.FXDualDoubleKnockoutLeg.rst
│ │ ├── gs_quant.instrument.FXEuropeanKnockout.rst
│ │ ├── gs_quant.instrument.FXForward.rst
│ │ ├── gs_quant.instrument.FXKnockout.rst
│ │ ├── gs_quant.instrument.FXMultiCrossBinary.rst
│ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.rst
│ │ ├── gs_quant.instrument.FXMultiCrossDoubleBinary.rst
│ │ ├── gs_quant.instrument.FXMultiCrossDoubleBinaryLeg.rst
│ │ ├── gs_quant.instrument.FXMultiCrossDoubleOneTouch.rst
│ │ ├── gs_quant.instrument.FXMultiCrossDoubleOneTouchLeg.rst
│ │ ├── gs_quant.instrument.FXOneTouch.rst
│ │ ├── gs_quant.instrument.FXOption.rst
│ │ ├── gs_quant.instrument.FXOptionLeg.rst
│ │ ├── gs_quant.instrument.FXOptionStrategy.rst
│ │ ├── gs_quant.instrument.FXPivot.rst
│ │ ├── gs_quant.instrument.FXPivotScheduleLeg.rst
│ │ ├── gs_quant.instrument.FXShiftingBermForward.rst
│ │ ├── gs_quant.instrument.FXTarf.rst
│ │ ├── gs_quant.instrument.FXTarfScheduleLeg.rst
│ │ ├── gs_quant.instrument.FXVarianceSwap.rst
│ │ ├── gs_quant.instrument.FXVolatilitySwap.rst
│ │ ├── gs_quant.instrument.FXWorstOf.rst
│ │ ├── gs_quant.instrument.FXWorstOfKO.rst
│ │ ├── gs_quant.instrument.FXWorstOfKOLeg.rst
│ │ ├── gs_quant.instrument.Forward.rst
│ │ ├── gs_quant.instrument.IRBasisSwap.rst
│ │ ├── gs_quant.instrument.IRCMSOption.rst
│ │ ├── gs_quant.instrument.IRCMSOptionStrip.rst
│ │ ├── gs_quant.instrument.IRCMSSpreadOption.rst
│ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.rst
│ │ ├── gs_quant.instrument.IRCap.rst
│ │ ├── gs_quant.instrument.IRFloor.rst
│ │ ├── gs_quant.instrument.IRSwap.rst
│ │ ├── gs_quant.instrument.IRSwaption.rst
│ │ ├── gs_quant.instrument.IRXccySwap.rst
│ │ ├── gs_quant.instrument.IRXccySwapFixFix.rst
│ │ ├── gs_quant.instrument.IRXccySwapFixFlt.rst
│ │ ├── gs_quant.instrument.InflationSwap.rst
│ │ ├── gs_quant.instrument.Security.rst
│ │ ├── gs_quant.markets.baskets.Basket.rst
│ │ ├── gs_quant.markets.core.PricingContext.rst
│ │ ├── gs_quant.markets.historical.HistoricalPricingContext.rst
│ │ ├── gs_quant.markets.index.Index.rst
│ │ ├── gs_quant.markets.indices_utils.BasketType.rst
│ │ ├── gs_quant.markets.indices_utils.CorporateActionType.rst
│ │ ├── gs_quant.markets.indices_utils.CustomBasketStyles.rst
│ │ ├── gs_quant.markets.indices_utils.FundamentalMetricPeriod.rst
│ │ ├── gs_quant.markets.indices_utils.FundamentalMetricPeriodDirection.rst
│ │ ├── gs_quant.markets.indices_utils.FundamentalsMetrics.rst
│ │ ├── gs_quant.markets.indices_utils.IndicesDatasets.rst
│ │ ├── gs_quant.markets.indices_utils.Region.rst
│ │ ├── gs_quant.markets.indices_utils.ResearchBasketStyles.rst
│ │ ├── gs_quant.markets.indices_utils.ReturnType.rst
│ │ ├── gs_quant.markets.indices_utils.WeightingStrategy.rst
│ │ ├── gs_quant.markets.portfolio.Grid.rst
│ │ ├── gs_quant.markets.portfolio.Portfolio.rst
│ │ ├── gs_quant.markets.portfolio_manager.PortfolioManager.rst
│ │ ├── gs_quant.markets.position_set.Position.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.rst
│ │ ├── gs_quant.markets.report.FactorRiskReport.rst
│ │ ├── gs_quant.markets.report.PerformanceReport.rst
│ │ ├── gs_quant.markets.report.Report.rst
│ │ ├── gs_quant.markets.report.ReportJobFuture.rst
│ │ ├── gs_quant.markets.report.ThematicReport.rst
│ │ ├── gs_quant.markets.securities.Asset.rst
│ │ ├── gs_quant.markets.securities.AssetClass.rst
│ │ ├── gs_quant.markets.securities.AssetIdentifier.rst
│ │ ├── gs_quant.markets.securities.AssetType.rst
│ │ ├── gs_quant.markets.securities.SecurityMaster.rst
│ │ ├── gs_quant.markets.securities.Stock.rst
│ │ ├── gs_quant.models.epidemiology.EpidemicModel.rst
│ │ ├── gs_quant.models.epidemiology.SEIR.rst
│ │ ├── gs_quant.models.epidemiology.SIR.rst
│ │ ├── gs_quant.models.risk_model.FactorRiskModel.rst
│ │ ├── gs_quant.models.risk_model.MacroRiskModel.rst
│ │ ├── gs_quant.models.risk_model.MarqueeRiskModel.rst
│ │ ├── gs_quant.models.risk_model.RiskModel.rst
│ │ ├── gs_quant.models.risk_model.ThematicRiskModel.rst
│ │ ├── gs_quant.timeseries.backtesting.Basket.rst
│ │ ├── gs_quant.timeseries.datetime.Window.rst
│ │ ├── gs_quant.timeseries.statistics.LinearRegression.rst
│ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.rst
│ │ ├── gs_quant.timeseries.statistics.SEIRModel.rst
│ │ └── gs_quant.timeseries.statistics.SIRModel.rst
│ ├── conf.py
│ ├── data.rst
│ ├── datetime.rst
│ ├── entities.rst
│ ├── functions/
│ │ ├── gs_quant.datetime.date.business_day_count.rst
│ │ ├── gs_quant.datetime.date.business_day_offset.rst
│ │ ├── gs_quant.datetime.date.date_range.rst
│ │ ├── gs_quant.datetime.date.is_business_day.rst
│ │ ├── gs_quant.datetime.date.prev_business_date.rst
│ │ ├── gs_quant.datetime.point.point_sort_order.rst
│ │ ├── gs_quant.markets.baskets.Basket.add_factor_risk_report.rst
│ │ ├── gs_quant.markets.baskets.Basket.cancel_rebalance.rst
│ │ ├── gs_quant.markets.baskets.Basket.clone.rst
│ │ ├── gs_quant.markets.baskets.Basket.create.rst
│ │ ├── gs_quant.markets.baskets.Basket.delete_factor_risk_report.rst
│ │ ├── gs_quant.markets.baskets.Basket.entity_type.rst
│ │ ├── gs_quant.markets.baskets.Basket.get.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_close_price_for_date.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_close_prices.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_corporate_actions.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_data_coordinate.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_data_series.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_details.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_entity.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_fundamentals.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_identifier.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_identifiers.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_latest_close_price.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_latest_position_set.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_latest_rebalance_data.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_latest_rebalance_date.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_live_date.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_marquee_id.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_position_set_for_date.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_position_sets.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_positions_data.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_rebalance_approval_status.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_type.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_unique_entity_key.rst
│ │ ├── gs_quant.markets.baskets.Basket.get_url.rst
│ │ ├── gs_quant.markets.baskets.Basket.poll_report.rst
│ │ ├── gs_quant.markets.baskets.Basket.poll_status.rst
│ │ ├── gs_quant.markets.baskets.Basket.update.rst
│ │ ├── gs_quant.markets.baskets.Basket.upload_position_history.rst
│ │ ├── gs_quant.markets.index.Index.get.rst
│ │ ├── gs_quant.markets.index.Index.get_close_price_for_date.rst
│ │ ├── gs_quant.markets.index.Index.get_close_prices.rst
│ │ ├── gs_quant.markets.index.Index.get_constituent_instruments.rst
│ │ ├── gs_quant.markets.index.Index.get_constituent_instruments_for_date.rst
│ │ ├── gs_quant.markets.index.Index.get_constituents.rst
│ │ ├── gs_quant.markets.index.Index.get_constituents_for_date.rst
│ │ ├── gs_quant.markets.index.Index.get_currency.rst
│ │ ├── gs_quant.markets.index.Index.get_data_coordinate.rst
│ │ ├── gs_quant.markets.index.Index.get_data_series.rst
│ │ ├── gs_quant.markets.index.Index.get_entitlements.rst
│ │ ├── gs_quant.markets.index.Index.get_entity.rst
│ │ ├── gs_quant.markets.index.Index.get_factor_risk_report.rst
│ │ ├── gs_quant.markets.index.Index.get_fundamentals.rst
│ │ ├── gs_quant.markets.index.Index.get_identifier.rst
│ │ ├── gs_quant.markets.index.Index.get_identifiers.rst
│ │ ├── gs_quant.markets.index.Index.get_latest_close_price.rst
│ │ ├── gs_quant.markets.index.Index.get_latest_constituent_instruments.rst
│ │ ├── gs_quant.markets.index.Index.get_latest_constituents.rst
│ │ ├── gs_quant.markets.index.Index.get_latest_position_set.rst
│ │ ├── gs_quant.markets.index.Index.get_marquee_id.rst
│ │ ├── gs_quant.markets.index.Index.get_position_dates.rst
│ │ ├── gs_quant.markets.index.Index.get_position_set_for_date.rst
│ │ ├── gs_quant.markets.index.Index.get_position_sets.rst
│ │ ├── gs_quant.markets.index.Index.get_positions_data.rst
│ │ ├── gs_quant.markets.index.Index.get_return_type.rst
│ │ ├── gs_quant.markets.index.Index.get_status_of_reports.rst
│ │ ├── gs_quant.markets.index.Index.get_type.rst
│ │ ├── gs_quant.markets.index.Index.get_underlier_attribution.rst
│ │ ├── gs_quant.markets.index.Index.get_underlier_tree.rst
│ │ ├── gs_quant.markets.index.Index.get_underlier_weights.rst
│ │ ├── gs_quant.markets.index.Index.get_unique_entity_key.rst
│ │ ├── gs_quant.markets.index.Index.get_url.rst
│ │ ├── gs_quant.markets.index.Index.update_positions.rst
│ │ ├── gs_quant.markets.index.Index.visualise_tree.rst
│ │ ├── gs_quant.markets.indices_utils.get_flagship_baskets.rst
│ │ ├── gs_quant.markets.indices_utils.get_flagships_constituents.rst
│ │ ├── gs_quant.markets.indices_utils.get_flagships_performance.rst
│ │ ├── gs_quant.markets.indices_utils.get_flagships_with_assets.rst
│ │ ├── gs_quant.markets.indices_utils.get_my_baskets.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.equalize_position_weights.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.from_dicts.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.from_frame.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.from_list.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.get_positions.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.get_unpriced_positions.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.get_unresolved_positions.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.price.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.price_many.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.remove_unpriced_positions.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.remove_unresolved_positions.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.resolve.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.resolve_many.rst
│ │ ├── gs_quant.markets.position_set.PositionSet.to_frame.rst
│ │ ├── gs_quant.timeseries.algebra.abs_.rst
│ │ ├── gs_quant.timeseries.algebra.add.rst
│ │ ├── gs_quant.timeseries.algebra.and_.rst
│ │ ├── gs_quant.timeseries.algebra.ceil.rst
│ │ ├── gs_quant.timeseries.algebra.divide.rst
│ │ ├── gs_quant.timeseries.algebra.exp.rst
│ │ ├── gs_quant.timeseries.algebra.filter_.rst
│ │ ├── gs_quant.timeseries.algebra.filter_dates.rst
│ │ ├── gs_quant.timeseries.algebra.floor.rst
│ │ ├── gs_quant.timeseries.algebra.floordiv.rst
│ │ ├── gs_quant.timeseries.algebra.if_.rst
│ │ ├── gs_quant.timeseries.algebra.log.rst
│ │ ├── gs_quant.timeseries.algebra.multiply.rst
│ │ ├── gs_quant.timeseries.algebra.not_.rst
│ │ ├── gs_quant.timeseries.algebra.or_.rst
│ │ ├── gs_quant.timeseries.algebra.power.rst
│ │ ├── gs_quant.timeseries.algebra.sqrt.rst
│ │ ├── gs_quant.timeseries.algebra.subtract.rst
│ │ ├── gs_quant.timeseries.algebra.weighted_sum.rst
│ │ ├── gs_quant.timeseries.analysis.compare.rst
│ │ ├── gs_quant.timeseries.analysis.count.rst
│ │ ├── gs_quant.timeseries.analysis.diff.rst
│ │ ├── gs_quant.timeseries.analysis.first.rst
│ │ ├── gs_quant.timeseries.analysis.lag.rst
│ │ ├── gs_quant.timeseries.analysis.last.rst
│ │ ├── gs_quant.timeseries.analysis.last_value.rst
│ │ ├── gs_quant.timeseries.backtesting.basket_series.rst
│ │ ├── gs_quant.timeseries.datetime.align.rst
│ │ ├── gs_quant.timeseries.datetime.bucketize.rst
│ │ ├── gs_quant.timeseries.datetime.date_range.rst
│ │ ├── gs_quant.timeseries.datetime.day.rst
│ │ ├── gs_quant.timeseries.datetime.interpolate.rst
│ │ ├── gs_quant.timeseries.datetime.month.rst
│ │ ├── gs_quant.timeseries.datetime.prepend.rst
│ │ ├── gs_quant.timeseries.datetime.quarter.rst
│ │ ├── gs_quant.timeseries.datetime.union.rst
│ │ ├── gs_quant.timeseries.datetime.value.rst
│ │ ├── gs_quant.timeseries.datetime.weekday.rst
│ │ ├── gs_quant.timeseries.datetime.year.rst
│ │ ├── gs_quant.timeseries.econometrics.annualize.rst
│ │ ├── gs_quant.timeseries.econometrics.beta.rst
│ │ ├── gs_quant.timeseries.econometrics.change.rst
│ │ ├── gs_quant.timeseries.econometrics.correlation.rst
│ │ ├── gs_quant.timeseries.econometrics.excess_returns_.rst
│ │ ├── gs_quant.timeseries.econometrics.index.rst
│ │ ├── gs_quant.timeseries.econometrics.max_drawdown.rst
│ │ ├── gs_quant.timeseries.econometrics.prices.rst
│ │ ├── gs_quant.timeseries.econometrics.returns.rst
│ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.rst
│ │ ├── gs_quant.timeseries.econometrics.volatility.rst
│ │ ├── gs_quant.timeseries.statistics.cov.rst
│ │ ├── gs_quant.timeseries.statistics.exponential_std.rst
│ │ ├── gs_quant.timeseries.statistics.generate_series.rst
│ │ ├── gs_quant.timeseries.statistics.max_.rst
│ │ ├── gs_quant.timeseries.statistics.mean.rst
│ │ ├── gs_quant.timeseries.statistics.median.rst
│ │ ├── gs_quant.timeseries.statistics.min_.rst
│ │ ├── gs_quant.timeseries.statistics.mode.rst
│ │ ├── gs_quant.timeseries.statistics.percentile.rst
│ │ ├── gs_quant.timeseries.statistics.percentiles.rst
│ │ ├── gs_quant.timeseries.statistics.product.rst
│ │ ├── gs_quant.timeseries.statistics.range_.rst
│ │ ├── gs_quant.timeseries.statistics.std.rst
│ │ ├── gs_quant.timeseries.statistics.sum_.rst
│ │ ├── gs_quant.timeseries.statistics.var.rst
│ │ ├── gs_quant.timeseries.statistics.winsorize.rst
│ │ ├── gs_quant.timeseries.statistics.zscores.rst
│ │ ├── gs_quant.timeseries.technicals.bollinger_bands.rst
│ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.rst
│ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.rst
│ │ ├── gs_quant.timeseries.technicals.exponential_volatility.rst
│ │ ├── gs_quant.timeseries.technicals.macd.rst
│ │ ├── gs_quant.timeseries.technicals.moving_average.rst
│ │ ├── gs_quant.timeseries.technicals.relative_strength_index.rst
│ │ ├── gs_quant.timeseries.technicals.seasonally_adjusted.rst
│ │ ├── gs_quant.timeseries.technicals.smoothed_moving_average.rst
│ │ └── gs_quant.timeseries.technicals.trend.rst
│ ├── html/
│ │ ├── .doctrees/
│ │ │ ├── environment.pickle
│ │ │ ├── index.doctree
│ │ │ └── timeseries.doctree
│ │ ├── _sources/
│ │ │ └── timeseries.rst.txt
│ │ ├── objects.inv
│ │ └── searchindex.js
│ ├── index.rst
│ ├── instrument.rst
│ ├── make.bat
│ ├── markets.rst
│ ├── models.rst
│ ├── module/
│ │ └── models.rst
│ ├── modules/
│ │ └── gs_quant.markets.indices_utils.rst
│ ├── risk.rst
│ ├── searchdataext/
│ │ └── __init__.py
│ └── timeseries.rst
├── gs_quant/
│ ├── __init__.py
│ ├── _version.py
│ ├── analytics/
│ │ ├── __init__.py
│ │ ├── common/
│ │ │ ├── __init__.py
│ │ │ ├── constants.py
│ │ │ ├── enumerators.py
│ │ │ └── helpers.py
│ │ ├── core/
│ │ │ ├── __init__.py
│ │ │ ├── processor.py
│ │ │ ├── processor_result.py
│ │ │ └── query_helpers.py
│ │ ├── datagrid/
│ │ │ ├── __init__.py
│ │ │ ├── data_cell.py
│ │ │ ├── data_column.py
│ │ │ ├── data_row.py
│ │ │ ├── datagrid.py
│ │ │ ├── serializers.py
│ │ │ └── utils.py
│ │ ├── processors/
│ │ │ ├── __init__.py
│ │ │ ├── analysis_processors.py
│ │ │ ├── econometrics_processors.py
│ │ │ ├── scale_processors.py
│ │ │ ├── special_processors.py
│ │ │ ├── statistics_processors.py
│ │ │ └── utility_processors.py
│ │ └── workspaces/
│ │ ├── __init__.py
│ │ ├── components.py
│ │ └── workspace.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── api_cache.py
│ │ ├── api_session.py
│ │ ├── data.py
│ │ ├── fred/
│ │ │ ├── __init__.py
│ │ │ ├── data.py
│ │ │ └── fred_query.py
│ │ ├── gs/
│ │ │ ├── __init__.py
│ │ │ ├── assets.py
│ │ │ ├── backtests.py
│ │ │ ├── backtests_xasset/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── apis.py
│ │ │ │ ├── json_encoders/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── request_encoders.py
│ │ │ │ │ ├── response_datatypes/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── generic_datatype_encoders.py
│ │ │ │ │ │ ├── risk_result_datatype_encoders.py
│ │ │ │ │ │ ├── risk_result_encoders.py
│ │ │ │ │ │ └── test_backtest_datatypes_encoders.py
│ │ │ │ │ └── response_encoders.py
│ │ │ │ ├── request.py
│ │ │ │ ├── response.py
│ │ │ │ └── response_datatypes/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── backtest_datatypes.py
│ │ │ │ ├── generic_backtest_datatypes.py
│ │ │ │ ├── risk_result.py
│ │ │ │ └── risk_result_datatypes.py
│ │ │ ├── base_screener.py
│ │ │ ├── carbon.py
│ │ │ ├── content.py
│ │ │ ├── countries.py
│ │ │ ├── data.py
│ │ │ ├── data_screen.py
│ │ │ ├── datagrid.py
│ │ │ ├── esg.py
│ │ │ ├── federated_secmaster.py
│ │ │ ├── groups.py
│ │ │ ├── hedges.py
│ │ │ ├── indices.py
│ │ │ ├── monitors.py
│ │ │ ├── parser.py
│ │ │ ├── plots.py
│ │ │ ├── portfolios.py
│ │ │ ├── price.py
│ │ │ ├── reports.py
│ │ │ ├── risk.py
│ │ │ ├── risk_models.py
│ │ │ ├── scenarios.py
│ │ │ ├── screens.py
│ │ │ ├── secmaster.py
│ │ │ ├── thematics.py
│ │ │ ├── users.py
│ │ │ └── workspaces.py
│ │ ├── risk.py
│ │ └── utils.py
│ ├── backtests/
│ │ ├── SKILL.md
│ │ ├── __init__.py
│ │ ├── action_handler.py
│ │ ├── actions.py
│ │ ├── backtest_engine.py
│ │ ├── backtest_objects.py
│ │ ├── backtest_utils.py
│ │ ├── core.py
│ │ ├── data_handler.py
│ │ ├── data_sources.py
│ │ ├── decorator.py
│ │ ├── equity_vol_engine.py
│ │ ├── event.py
│ │ ├── execution_engine.py
│ │ ├── generic_engine.py
│ │ ├── generic_engine_action_impls.py
│ │ ├── order.py
│ │ ├── predefined_asset_engine.py
│ │ ├── strategy.py
│ │ ├── strategy_systematic.py
│ │ └── triggers.py
│ ├── base.py
│ ├── common.py
│ ├── config/
│ │ ├── __init__.py
│ │ └── options.py
│ ├── config.ini
│ ├── content/
│ │ ├── Contents.ipynb
│ │ ├── Index.ipynb
│ │ ├── README.md
│ │ ├── __init__.py
│ │ ├── events/
│ │ │ └── 00_gsquant_meets_markets/
│ │ │ ├── 00_us_election_analysis/
│ │ │ │ ├── 0000_macro_big_picture.ipynb
│ │ │ │ ├── 0001_portfolios_and_var.ipynb
│ │ │ │ ├── 0002_past_elections.ipynb
│ │ │ │ └── 0003_trades.ipynb
│ │ │ ├── 01_ideas_for_risk_re_rating/
│ │ │ │ ├── eq_sx5e_spx_vol_spread_trade.ipynb
│ │ │ │ ├── fx_covid19_recovery_trade.ipynb
│ │ │ │ └── inflation_covid19_recovery_trade.ipynb
│ │ │ ├── 02_optimizing_equity_trading/
│ │ │ │ ├── qes_utils.py
│ │ │ │ ├── quants_meet_markets_qes.ipynb
│ │ │ │ ├── section_a_liquidity_and_clusters.ipynb
│ │ │ │ ├── section_b_ownership.ipynb
│ │ │ │ ├── section_c_apex.ipynb
│ │ │ │ └── trade_list_world.csv
│ │ │ └── 03_esg_basket_portfolio_optimisation/
│ │ │ └── quants_meet_markets_msci.ipynb
│ │ ├── made_with_gs_quant/
│ │ │ ├── 1-Navigating Rates.ipynb
│ │ │ ├── 10-Explaining Performance Drivers.ipynb
│ │ │ ├── 11-FX Election Hedge.ipynb
│ │ │ ├── 12-Structuring for Uncertaintly.ipynb
│ │ │ ├── 13-Cyclicals.ipynb
│ │ │ ├── 14-Curve Inversions.ipynb
│ │ │ ├── 15-Hypothetical Lifetime Risk Calculator.ipynb
│ │ │ ├── 2-Levels and Tails.ipynb
│ │ │ ├── 3-Systematic Selling.ipynb
│ │ │ ├── 4-Delta Hedging.ipynb
│ │ │ ├── 5-What's New.ipynb
│ │ │ ├── 6-Evolving Correlations.ipynb
│ │ │ ├── 7-Predicting Performance and Live Risk.ipynb
│ │ │ ├── 8-What's New Internal.ipynb
│ │ │ └── 9-Hedging using Machine Learning Techniques.ipynb
│ │ └── reports_and_screens/
│ │ ├── 00_fx/
│ │ │ ├── 0000_vol_screen.ipynb
│ │ │ ├── 0001_vol_calendar_screen.ipynb
│ │ │ ├── 0002_forward_vol_screen.ipynb
│ │ │ ├── 0003_10x_binary_screen.ipynb
│ │ │ ├── 0004_bear_put_spread_screen.ipynb
│ │ │ ├── 0005_vol_skew.ipynb
│ │ │ ├── 0006_vol_swap_spread.ipynb
│ │ │ ├── 0007_eq_fx_hedges.ipynb
│ │ │ ├── __init__.py
│ │ │ └── vol_screen_app.py
│ │ ├── 02_rates/
│ │ │ ├── 0000_vol_fixed_strike_grid.ipynb
│ │ │ ├── 0001_vol_moneyness_screen.ipynb
│ │ │ ├── 0002_swaption_carry_grid.ipynb
│ │ │ └── 0003_spot_vol_shock.ipynb
│ │ ├── 03_prime/
│ │ │ ├── 0001_gs_pb_data_case_study_sector_positioning.ipynb
│ │ │ ├── 0002_gs_pb_data_case_study_flows.ipynb
│ │ │ ├── 0003_gs_pb_data_case_study_factors.ipynb
│ │ │ ├── 0004_gs_pb_data_case_study_country_positioning.ipynb
│ │ │ └── 0005_gs_pb_data_case_study_leverage.ipynb
│ │ ├── README.md
│ │ └── __init__.py
│ ├── context_base.py
│ ├── data/
│ │ ├── __init__.py
│ │ ├── coordinate.py
│ │ ├── core.py
│ │ ├── dataset.py
│ │ ├── fields.py
│ │ ├── log.py
│ │ ├── query.py
│ │ ├── stream.py
│ │ └── utilities.py
│ ├── datetime/
│ │ ├── __init__.py
│ │ ├── date.py
│ │ ├── gscalendar.py
│ │ ├── point.py
│ │ ├── relative_date.py
│ │ ├── rules.py
│ │ └── time.py
│ ├── documentation/
│ │ ├── 00_data/
│ │ │ ├── 00_datasets/
│ │ │ │ └── examples/
│ │ │ │ ├── 0000_query_dataset.ipynb
│ │ │ │ ├── 0001_get_dataset_coverage.ipynb
│ │ │ │ ├── 0002_using_data_contexts.ipynb
│ │ │ │ ├── 0003_get_data_using_coordinate.ipynb
│ │ │ │ ├── 0004_get_all_assets_from_region.ipynb
│ │ │ │ ├── 0005_get_vol_surface.ipynb
│ │ │ │ ├── 0006_ptp_dataset.ipynb
│ │ │ │ ├── 0007_query_fxvol.script.ipynb
│ │ │ │ └── 0008_s3_partners_short_interest.ipynb
│ │ │ ├── 01_analytics/
│ │ │ │ └── examples/
│ │ │ │ ├── 0000_charting_data.ipynb
│ │ │ │ └── 0001_exporting_data.ipynb
│ │ │ ├── 02_workspaces/
│ │ │ │ └── examples/
│ │ │ │ └── 0001_creating_a_workspace.ipynb
│ │ │ ├── 03_visualizations/
│ │ │ │ └── examples/
│ │ │ │ └── 0001_creating_a_visualization.ipynb
│ │ │ ├── 04_screens/
│ │ │ │ └── examples/
│ │ │ │ ├── 00_base_screener_api_tutorial.ipynb
│ │ │ │ └── 01_screen_api_tutorial.ipynb
│ │ │ └── covid/
│ │ │ └── Comparing, Reconciling, and Combining COVID-19 Data Sources.ipynb
│ │ ├── 01_markets/
│ │ │ ├── 00_securities/
│ │ │ │ └── examples/
│ │ │ │ └── 0000_get_an_asset_from_identifier.ipynb
│ │ │ └── 02_rdates/
│ │ │ └── examples/
│ │ │ ├── 0000_get_a_date_relative_from_today.ipynb
│ │ │ ├── 0001_get_a_date_relative_from_a_base_date.ipynb
│ │ │ ├── 0002_get_a_date_relative_using_pricing_context.ipynb
│ │ │ ├── 0003_get_a_date_using_a_business_day_calendar.ipynb
│ │ │ ├── 0004_chaining_relativedate_rules.ipynb
│ │ │ └── 0005_passing_your_own_holiday_calendar.ipynb
│ │ ├── 02_pricing_and_risk/
│ │ │ ├── 00_instruments_and_measures/
│ │ │ │ ├── examples/
│ │ │ │ │ ├── 00_instrument_basics/
│ │ │ │ │ │ ├── 01_view-trade-properties.ipynb
│ │ │ │ │ │ ├── 02_get-a-property.ipynb
│ │ │ │ │ │ ├── 03_set-a-property.ipynb
│ │ │ │ │ │ ├── 04_enum-property.ipynb
│ │ │ │ │ │ ├── 05_resolve-a-trade.ipynb
│ │ │ │ │ │ ├── 06_market-data.ipynb
│ │ │ │ │ │ └── 07_float-with-info.ipynb
│ │ │ │ │ ├── 01_rates/
│ │ │ │ │ │ ├── 01_view_swap_definition.ipynb
│ │ │ │ │ │ ├── 02_swap_trade_construction.ipynb
│ │ │ │ │ │ ├── 03_calc_swap_price.ipynb
│ │ │ │ │ │ ├── 04_calc_swap_risk_measures.ipynb
│ │ │ │ │ │ ├── 05_calc_swap_price_in_pricing_context.ipynb
│ │ │ │ │ │ ├── 06_calc_swap_price_historically.ipynb
│ │ │ │ │ │ ├── 07_calc_swap_risks_in_pricing_context.ipynb
│ │ │ │ │ │ ├── 08_calc_swap_risk_historically.ipynb
│ │ │ │ │ │ ├── 09_swaption_trade_construction.ipynb
│ │ │ │ │ │ ├── 10_straddle_price.ipynb
│ │ │ │ │ │ ├── 11_midcurve_swaption_price.ipynb
│ │ │ │ │ │ ├── 12_swap_future_cashflows.ipynb
│ │ │ │ │ │ ├── 13_calc_xccy_swap_price.ipynb
│ │ │ │ │ │ ├── 14_calc_xccy_swap_risk_measures.ipynb
│ │ │ │ │ │ ├── 15_spread_option_grid_pricing.ipynb
│ │ │ │ │ │ ├── 16_change_discount_curve.ipynb
│ │ │ │ │ │ ├── 17_calc_xccy_swap_cashflows.ipynb
│ │ │ │ │ │ ├── 18_solve_present_value.ipynb
│ │ │ │ │ │ ├── 19_solve_delta.ipynb
│ │ │ │ │ │ ├── 20_fix_float_legs_price.ipynb
│ │ │ │ │ │ ├── 21_asset_swap_definition.ipynb
│ │ │ │ │ │ ├── 22_cap_floor.ipynb
│ │ │ │ │ │ └── 23_solve_vanna_&_volga.ipynb
│ │ │ │ │ ├── 02_fx/
│ │ │ │ │ │ ├── 01_fx_fwd_trade_construction.ipynb
│ │ │ │ │ │ ├── 02_fx_option_trade_construction.ipynb
│ │ │ │ │ │ ├── 03_fx_vol_swap_trade_construction.ipynb
│ │ │ │ │ │ ├── 04_fx_binary_trade_construction.ipynb
│ │ │ │ │ │ ├── 05_calc_option_measures.ipynb
│ │ │ │ │ │ ├── 06_fx_var_swap_trade_construction.ipynb
│ │ │ │ │ │ ├── 07_fx_knockout_trade_construction.ipynb
│ │ │ │ │ │ ├── 08_fx_double_touch_trade_construction.ipynb
│ │ │ │ │ │ ├── 09_fx_delta_measures.ipynb
│ │ │ │ │ │ └── 10_fx_gamma_measures.ipynb
│ │ │ │ │ ├── 03_eq/
│ │ │ │ │ │ ├── 000306_calc_eq_option_greeks.ipynb
│ │ │ │ │ │ ├── 01_calc_eq_option_price.ipynb
│ │ │ │ │ │ ├── 02_calc_eq_option_risk_measures.ipynb
│ │ │ │ │ │ ├── 03_calc_eq_option_price_and_risk_in_pricing_context.ipynb
│ │ │ │ │ │ ├── 04_calc_eq_option_price_and_risk_historically.ipynb
│ │ │ │ │ │ └── 05_calc_eq_option_portfolio_greeks.ipynb
│ │ │ │ │ └── 04_credit/
│ │ │ │ │ ├── 01_cdindex_option_price.ipynb
│ │ │ │ │ ├── 02_cdindex_option_xover_payer_spread.ipynb
│ │ │ │ │ ├── 03_cdindex_option_risks.ipynb
│ │ │ │ │ ├── 04_cdindex_price.ipynb
│ │ │ │ │ └── 05_cdindex_roll_price.ipynb
│ │ │ │ └── tutorials/
│ │ │ │ ├── Instruments.ipynb
│ │ │ │ └── Measures.ipynb
│ │ │ ├── 01_scenarios_and_contexts/
│ │ │ │ ├── examples/
│ │ │ │ │ ├── 00_market_objects/
│ │ │ │ │ │ ├── 010000_market_data_in_gs_quant.ipynb
│ │ │ │ │ │ ├── 010001_market_objects.ipynb
│ │ │ │ │ │ ├── 010002_marketdatapattern_basics.ipynb
│ │ │ │ │ │ ├── 010003_marketdatapattern_construction_ir.ipynb
│ │ │ │ │ │ ├── 010004_marketdatapattern_construction_ir_vol.ipynb
│ │ │ │ │ │ ├── 010005_marketdatapattern_construction_ir_basis.ipynb
│ │ │ │ │ │ ├── 010006_marketdatapattern_construction_ir_xc.ipynb
│ │ │ │ │ │ ├── 010007_marketdatapattern_construction_fx.ipynb
│ │ │ │ │ │ ├── 010008_marketdatapattern_construction_fx_fwd.ipynb
│ │ │ │ │ │ ├── 010009_marketdatapattern_construction_fx_vol.ipynb
│ │ │ │ │ │ └── 010010_marketdatapattern_construction_cd.ipynb
│ │ │ │ │ ├── 01_rollfwd_shock/
│ │ │ │ │ │ ├── 01_rollfwd_for_trade.ipynb
│ │ │ │ │ │ ├── 02_basic_use_of_rollfwd_scenario.ipynb
│ │ │ │ │ │ ├── 03_rollfwd-showing-lifecycling-effects-on-swaps-and-swaptions.ipynb
│ │ │ │ │ │ ├── 04_yield_curves_with_rollfwd.ipynb
│ │ │ │ │ │ └── 05_rollfwd_swap_fwd_rates.ipynb
│ │ │ │ │ ├── 02_market_shock/
│ │ │ │ │ │ ├── 010200_marketdatashockbasedscenario_basics.ipynb
│ │ │ │ │ │ ├── 010201_rate_spot_shock.ipynb
│ │ │ │ │ │ ├── 010202_rate_curve_shock.ipynb
│ │ │ │ │ │ ├── 010203_rate_vol_shock.ipynb
│ │ │ │ │ │ ├── 010204_delta_shock_equivalent.ipynb
│ │ │ │ │ │ ├── 010205_vega_shock_equivalent.ipynb
│ │ │ │ │ │ ├── 010206_eq_spot_shock.ipynb
│ │ │ │ │ │ └── 010207_fx_shock_examples.ipynb
│ │ │ │ │ ├── 03_composite_shocks/
│ │ │ │ │ │ ├── 010300_rate_composite_shocks.ipynb
│ │ │ │ │ │ └── 010301_multiple_shocks.ipynb
│ │ │ │ │ ├── 04_curve_shock/
│ │ │ │ │ │ ├── 010400_parallel_curve_shock.ipynb
│ │ │ │ │ │ ├── 010401_curve_shock_midpoint.ipynb
│ │ │ │ │ │ ├── 010402_bear_steepener_curve_shock.ipynb
│ │ │ │ │ │ ├── 010403_bull_steepener_curve_shock.ipynb
│ │ │ │ │ │ ├── 010404_bear_flattener_curve_shock.ipynb
│ │ │ │ │ │ └── 010405_bull_flattener_curve_shock.ipynb
│ │ │ │ │ ├── 05_market_override/
│ │ │ │ │ │ ├── 010501_eq_spot_override.ipynb
│ │ │ │ │ │ └── 010502_eq_future_override.ipynb
│ │ │ │ │ ├── 06_vol_market_override/
│ │ │ │ │ │ ├── 010601_eq_vol_override_eod.ipynb
│ │ │ │ │ │ └── 010601_eq_vol_override_intraday.ipynb
│ │ │ │ │ ├── 07_curve_overlay/
│ │ │ │ │ │ ├── 010700_discount_curve_overlay.ipynb
│ │ │ │ │ │ └── CurveExample.csv
│ │ │ │ │ ├── 08_multi_scenario/
│ │ │ │ │ │ └── 010801_multi_scenario_shock.ipynb
│ │ │ │ │ └── 09_measure_scenario/
│ │ │ │ │ ├── 010901_fx_override_example.ipynb
│ │ │ │ │ ├── 010902_rates_override_example.ipynb
│ │ │ │ │ └── 010903_eq_override_example.ipynb
│ │ │ │ └── tutorials/
│ │ │ │ ├── Pricing_Context.ipynb
│ │ │ │ └── Scenarios.ipynb
│ │ │ └── External Demo v1.ipynb
│ │ ├── 03_portfolios/
│ │ │ ├── examples/
│ │ │ │ ├── .ipynb_checkpoints/
│ │ │ │ │ └── 030000_create_portfolio-checkpoint.ipynb
│ │ │ │ ├── 030000_create_portfolio.ipynb
│ │ │ │ ├── 030001_modify_instruments.ipynb
│ │ │ │ ├── 030002_extracting_instruments_and_results.ipynb
│ │ │ │ ├── 030003_resolve_portfolio.ipynb
│ │ │ │ ├── 030004_price_portfolio.ipynb
│ │ │ │ ├── 030005_calculate_portfolio_risk.ipynb
│ │ │ │ ├── 030006_portfolio_grid_calc.ipynb
│ │ │ │ ├── 030007_pnl_explain.ipynb
│ │ │ │ ├── 030008_portflio_from_frame.ipynb
│ │ │ │ ├── 030009_portfolio_risk_result_to_frame.ipynb
│ │ │ │ ├── 030010_portfolio_intra_leg_dependencies.ipynb
│ │ │ │ ├── 030011_portfolio_from_csv.ipynb
│ │ │ │ └── my_excel_portfolio.csv
│ │ │ └── tutorials/
│ │ │ ├── Create New Portfolio.ipynb
│ │ │ ├── Portfolios.ipynb
│ │ │ ├── Pull Portfolio Factor Risk Data.ipynb
│ │ │ ├── Pull Portfolio Performance Data.ipynb
│ │ │ ├── Pull Portfolio Risk Data.ipynb
│ │ │ └── Update Historical Portfolio.ipynb
│ │ ├── 04_backtesting/
│ │ │ ├── examples/
│ │ │ │ ├── 01_PredefinedAssetEngine/
│ │ │ │ │ └── 040100_simple_example.ipynb
│ │ │ │ ├── 02_EquityVolEngine/
│ │ │ │ │ ├── 040200_strategy_simple.ipynb
│ │ │ │ │ ├── 040201_strategy_delta_hedged.ipynb
│ │ │ │ │ ├── 040202_strategy_pnl_decomposition.ipynb
│ │ │ │ │ ├── 040203_strategy_with_signals.ipynb
│ │ │ │ │ ├── 040204_strategy_market_model.ipynb
│ │ │ │ │ └── 040205_strategy_scaled_add_action.ipynb
│ │ │ │ └── 03_GenericEngine/
│ │ │ │ ├── 040300_strategy_periodic_trigger.ipynb
│ │ │ │ ├── 040301_strategy_risk_trigger.ipynb
│ │ │ │ ├── 040302_strategy_delta_hedge_FX.ipynb
│ │ │ │ ├── 040303_strategy_delta_hedge_Rates.ipynb
│ │ │ │ ├── 040304_strategy_mean_reversion.ipynb
│ │ │ │ ├── 040305_strategy_exit_trade_action.ipynb
│ │ │ │ ├── 040306_strategy_mkt_trigger.ipynb
│ │ │ │ ├── 040307_strategy_seagull_bullish.ipynb
│ │ │ │ ├── 040308_rebalance_action.ipynb
│ │ │ │ ├── 040309_inflation_hedging_strategy.ipynb
│ │ │ │ ├── 040310_initial_swap_hedging_strategy_varying_CSA.ipynb
│ │ │ │ ├── 040311_handling_holidays.ipynb
│ │ │ │ ├── 040312_strategy_scaled_add_action.ipynb
│ │ │ │ ├── 040313_chained_actions.ipynb
│ │ │ │ └── 040314_gradual_entries.ipynb
│ │ │ └── tutorials/
│ │ │ ├── Backtesting.ipynb
│ │ │ └── Basic backtest walkthrough.ipynb
│ │ ├── 05_factor_models/
│ │ │ ├── 01_Factor_Models.ipynb
│ │ │ └── 02_Upload_Factor_Models.ipynb
│ │ ├── 06_baskets/
│ │ │ ├── examples/
│ │ │ │ ├── 01_basket_composition_data/
│ │ │ │ │ ├── 0000_get_latest_basket_composition.ipynb
│ │ │ │ │ ├── 0001_get_basket_composition_for_date.ipynb
│ │ │ │ │ ├── 0002_get_basket_composition_for_date_range.ipynb
│ │ │ │ │ ├── 0003_get_full_basket_composition_history.ipynb
│ │ │ │ │ ├── 0004_get_basket_composition_dates.ipynb
│ │ │ │ │ └── 0005_get_basket_composition_dataset_coverage.ipynb
│ │ │ │ ├── 02_basket_pricing_data/
│ │ │ │ │ ├── 0000_get_latest_basket_close_price.ipynb
│ │ │ │ │ ├── 0001_get_basket_close_price_for_date.ipynb
│ │ │ │ │ ├── 0002_get_basket_close_price_for_dates.ipynb
│ │ │ │ │ └── 0003_get_full_basket_close_price_history.ipynb
│ │ │ │ ├── 03_basket_creation/
│ │ │ │ │ ├── 0000_clone_basket_position_set.ipynb
│ │ │ │ │ └── position_set/
│ │ │ │ │ ├── 0000_create_position_set_using_position_weights.ipynb
│ │ │ │ │ ├── 0001_create_position_set_using_position_quantities.ipynb
│ │ │ │ │ ├── 0002_create_position_set_of_equal_weight_from_list_of_identifiers.ipynb
│ │ │ │ │ ├── 0003_equalize_position_set_weights.ipynb
│ │ │ │ │ ├── 0004_add_position_to_existing_position_set.ipynb
│ │ │ │ │ ├── 0005_create_position_set_from_list_of_dictionaries.ipynb
│ │ │ │ │ ├── 0006_create_position_set_from_dataframe.ipynb
│ │ │ │ │ ├── 0007_create_position_set_from_csv.ipynb
│ │ │ │ │ ├── 0008_create_position_set_from_excel.ipynb
│ │ │ │ │ ├── 0009_fetch_position_quantities_from_weights.ipynb
│ │ │ │ │ ├── 0010_fetch_position_weights_from_quantities.ipynb
│ │ │ │ │ ├── 0011_redistribute_position_weights.ipynb
│ │ │ │ │ └── 0012_create_historical_position_sets_from_excel.ipynb
│ │ │ │ ├── 04_basket_corporate_actions_data/
│ │ │ │ │ ├── 0000_get_full_basket_corporate_actions_history.ipynb
│ │ │ │ │ ├── 0001_get_basket_corporate_actions_for_dates.ipynb
│ │ │ │ │ ├── 0002_get_basket_upcoming_corporate_actions.ipynb
│ │ │ │ │ └── 0003_get_specific_corporate_actions_types.ipynb
│ │ │ │ ├── 05_basket_fundamentals_data/
│ │ │ │ │ ├── 0000_get_basket_fundamentals_history.ipynb
│ │ │ │ │ ├── 0001_get_basket_fundamentals_for_dates.ipynb
│ │ │ │ │ ├── 0001_get_basket_fundamentals_specific_period_and_direction.ipynb
│ │ │ │ │ ├── 0002_get_basket_fundamentals_for_date_range.ipynb
│ │ │ │ │ ├── 0002_get_basket_fundamentals_specific_period_and_direction.ipynb
│ │ │ │ │ └── 0003_get_specific_basket_fundamentals_metrics.ipynb
│ │ │ │ ├── 06_basket_reports/
│ │ │ │ │ ├── 0000_create_new_factor_risk_report.ipynb
│ │ │ │ │ ├── 0001_delete_existing_factor_risk_report.ipynb
│ │ │ │ │ ├── 0002_get_existing_factor_risk_report.ipynb
│ │ │ │ │ ├── 0003_get_all_existing_basket_reports.ipynb
│ │ │ │ │ ├── 0004_get_status_of_all_existing_basket_reports.ipynb
│ │ │ │ │ ├── 0005_poll_status_of_most_recent_basket_create_report.ipynb
│ │ │ │ │ └── 0006_poll_report_status_using_report_id.ipynb
│ │ │ │ ├── 07_basket_permissions/
│ │ │ │ │ ├── 0000_get_basket_permissions.ipynb
│ │ │ │ │ ├── 0001_permission_application_to_basket.ipynb
│ │ │ │ │ ├── 0002_permission_user_to_basket_by_email.ipynb
│ │ │ │ │ ├── 0003_permission_group_to_basket.ipynb
│ │ │ │ │ ├── 0004_remove_basket_permissions.ipynb
│ │ │ │ │ └── 0005_get_your_permissioned_baskets.ipynb
│ │ │ │ └── 08_flagship_baskets/
│ │ │ │ ├── 0000_get_flagship_baskets.ipynb
│ │ │ │ ├── 0001_get_flagship_baskets_on_date.ipynb
│ │ │ │ ├── 0002_get_flagship_baskets_containing_assets.ipynb
│ │ │ │ ├── 0003_get_flagship_baskets_containing_assets_on_date.ipynb
│ │ │ │ ├── 0004_get_flagship_baskets_prices.ipynb
│ │ │ │ ├── 0005_get_flagship_baskets_prices_for_date_range.ipynb
│ │ │ │ ├── 0006_get_flagship_baskets_compositions.ipynb
│ │ │ │ ├── 0007_get_flagship_baskets_compositions_for_date_range.ipynb
│ │ │ │ ├── 0008_filter_flagship_baskets_by_basket_type.ipynb
│ │ │ │ ├── 0009_filter_flagship_baskets_by_region.ipynb
│ │ │ │ ├── 0010_filter_flagship_baskets_by_styles.ipynb
│ │ │ │ └── 0011_filter_flagship_baskets_by_ticker.ipynb
│ │ │ └── tutorials/
│ │ │ ├── Basket Backcast.ipynb
│ │ │ ├── Basket Create.ipynb
│ │ │ ├── Basket Edit.ipynb
│ │ │ └── Basket Rebalance.ipynb
│ │ ├── 07_index/
│ │ │ ├── README.md
│ │ │ ├── examples/
│ │ │ │ ├── 0000_get_index_Marquee_url.ipynb
│ │ │ │ ├── 0001_get_index_close_prices.ipynb
│ │ │ │ ├── 0002_get_index_fundamentals_data.ipynb
│ │ │ │ ├── 0003_get_index_constituents.ipynb
│ │ │ │ ├── 0004_get_index_weights_and_attribution.ipynb
│ │ │ │ └── 0005_get_index_as_a_tree.ipynb
│ │ │ └── tutorials/
│ │ │ └── GS Quant STS Index Tutorial.ipynb
│ │ ├── 08_tree_entity/
│ │ │ └── tree_entity.ipynb
│ │ ├── 09_security_master/
│ │ │ ├── Security Master SDK.ipynb
│ │ │ └── Security Master.ipynb
│ │ ├── 10_one_delta/
│ │ │ ├── Hedger/
│ │ │ │ ├── 01_Performance_Hedger.ipynb
│ │ │ │ ├── 02_Factor_Hedger_(Axioma_Portfolio_Optimizer).ipynb
│ │ │ │ └── 03_Continuous_Optimization.ipynb
│ │ │ ├── Portfolios/
│ │ │ │ ├── 01_Create_Backcasted_Portfolio.ipynb
│ │ │ │ ├── 02_Create_New_Historical_Portfolio.ipynb
│ │ │ │ ├── 03_Update_Historical_Portfolio.ipynb
│ │ │ │ ├── 04_Get_Factor_Attribution_Data.ipynb
│ │ │ │ ├── 05_Manage_a_Fund_of_Funds.ipynb
│ │ │ │ ├── 06_Get_Factor_Risk_Data.ipynb
│ │ │ │ ├── 07_Get_Portfolio_Performance_Analytics.ipynb
│ │ │ │ ├── 08_Get_ESG_Analytics.ipynb
│ │ │ │ ├── 09_Get_Carbon_Analytics.ipynb
│ │ │ │ └── 10_Get_Thematic_Analytics.ipynb
│ │ │ └── Reports/
│ │ │ ├── 01_Factor_Risk_Report.ipynb
│ │ │ ├── 02_Performance_Report.ipynb
│ │ │ └── 03_Thematic_Report.ipynb
│ │ ├── 11_macro_models/
│ │ │ ├── 01_Query_Macro_Models.ipynb
│ │ │ └── 02_Upload_Macro_Models.ipynb
│ │ ├── 12_scenarios/
│ │ │ ├── 01_Custom_Factor_Shocks.ipynb
│ │ │ └── 02_Historical_Scenarios.ipynb
│ │ ├── Contents.ipynb
│ │ ├── Index.ipynb
│ │ ├── README.md
│ │ └── git
│ ├── entities/
│ │ ├── __init__.py
│ │ ├── entitlements.py
│ │ ├── entity.py
│ │ ├── entity_utils.py
│ │ └── tree_entity.py
│ ├── errors.py
│ ├── instrument/
│ │ ├── __init__.py
│ │ ├── core.py
│ │ └── overrides.py
│ ├── interfaces/
│ │ ├── __init__.py
│ │ └── algebra.py
│ ├── json_convertors.py
│ ├── json_convertors_common.py
│ ├── json_encoder.py
│ ├── markets/
│ │ ├── __init__.py
│ │ ├── baskets.py
│ │ ├── core.py
│ │ ├── factor.py
│ │ ├── factor_analytics.py
│ │ ├── hedge.py
│ │ ├── historical.py
│ │ ├── index.py
│ │ ├── indices_utils.py
│ │ ├── markets.py
│ │ ├── optimizer.py
│ │ ├── portfolio.py
│ │ ├── portfolio_manager.py
│ │ ├── portfolio_manager_utils.py
│ │ ├── position_set.py
│ │ ├── position_set_utils.py
│ │ ├── report.py
│ │ ├── report_utils.py
│ │ ├── scenario.py
│ │ ├── screens.py
│ │ └── securities.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── epidemiology.py
│ │ ├── risk_model.py
│ │ └── risk_model_utils.py
│ ├── priceable.py
│ ├── quote_reports/
│ │ ├── __init__.py
│ │ └── core.py
│ ├── risk/
│ │ ├── __init__.py
│ │ ├── core.py
│ │ ├── measures.py
│ │ ├── result_handlers.py
│ │ ├── results.py
│ │ ├── scenario_utils.py
│ │ ├── scenarios.py
│ │ └── transform.py
│ ├── session.py
│ ├── target/
│ │ ├── __init__.py
│ │ ├── assets.py
│ │ ├── assets_screener.py
│ │ ├── backtests.py
│ │ ├── base_screener.py
│ │ ├── charts.py
│ │ ├── common.py
│ │ ├── content.py
│ │ ├── coordinates.py
│ │ ├── countries.py
│ │ ├── data.py
│ │ ├── data_screen.py
│ │ ├── groups.py
│ │ ├── hedge.py
│ │ ├── indices.py
│ │ ├── instrument.py
│ │ ├── measures.py
│ │ ├── monitor.py
│ │ ├── portfolios.py
│ │ ├── positions_v2_pricing.py
│ │ ├── price.py
│ │ ├── reports.py
│ │ ├── risk.py
│ │ ├── risk_models.py
│ │ ├── scenarios.py
│ │ ├── screens.py
│ │ ├── secmaster.py
│ │ ├── trades.py
│ │ ├── workflow_quote.py
│ │ └── workspaces_markets.py
│ ├── test/
│ │ ├── __init__.py
│ │ ├── analytics/
│ │ │ ├── __init__.py
│ │ │ ├── test_datagrid.py
│ │ │ ├── test_sorting_and_filtering.py
│ │ │ └── test_workspace.py
│ │ ├── api/
│ │ │ ├── __init__.py
│ │ │ ├── backtests_xasset/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── json_encoders/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── response_datatypes/
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── test_risk_result_datatype_encoders.py
│ │ │ │ │ │ └── test_risk_result_encoders.py
│ │ │ │ │ ├── test_request_encoders.py
│ │ │ │ │ └── test_response_encoders.py
│ │ │ │ ├── response_datatypes/
│ │ │ │ │ ├── test_backtest_datatypes.py
│ │ │ │ │ ├── test_risk_result.py
│ │ │ │ │ └── test_risk_result_datatypes.py
│ │ │ │ ├── test_request.py
│ │ │ │ └── test_response.py
│ │ │ ├── test_assets.py
│ │ │ ├── test_backtests.py
│ │ │ ├── test_base_screener.py
│ │ │ ├── test_cache.py
│ │ │ ├── test_carbon.py
│ │ │ ├── test_content.py
│ │ │ ├── test_data.py
│ │ │ ├── test_data_screen.py
│ │ │ ├── test_esg.py
│ │ │ ├── test_fred.py
│ │ │ ├── test_groups.py
│ │ │ ├── test_index.py
│ │ │ ├── test_instruments.py
│ │ │ ├── test_json.py
│ │ │ ├── test_monitor.py
│ │ │ ├── test_portfolios.py
│ │ │ ├── test_reports.py
│ │ │ ├── test_risk.py
│ │ │ ├── test_risk_models.py
│ │ │ ├── test_scenarios.py
│ │ │ ├── test_target.py
│ │ │ ├── test_thread_manager.py
│ │ │ └── test_users.py
│ │ ├── backtest/
│ │ │ ├── __init__.py
│ │ │ ├── test_backtest_eq_vol_engine.py
│ │ │ ├── test_backtest_flow_vol.py
│ │ │ ├── test_backtest_predefined.py
│ │ │ ├── test_generic_engine.py
│ │ │ └── test_triggers.py
│ │ ├── calc_cache/
│ │ │ ├── request00e305681f1f021b52ef57f22d4975f1.json
│ │ │ ├── request02db37fadb8c59eb98457c277883b4af.json
│ │ │ ├── request03cc64abac61cde741b4b5bf90fc3b0f.json
│ │ │ ├── request04e5386077a564977740976627ab683d.json
│ │ │ ├── request093e1ad35f25cb43fcad999f9adf8c50.json
│ │ │ ├── request0b8e0fc36f0a438251dafabc0b82b1a7.json
│ │ │ ├── request0c583177f98e8c0c7dba07ae2674c05a.json
│ │ │ ├── request0f156bd153459340c4bdb832aa95a1d0.json
│ │ │ ├── request102fef2814650c2f6ab945bb5f3cee73.json
│ │ │ ├── request12e470a54f4aa7c362e1014136a5d35d.json
│ │ │ ├── request14c45549336e6d4b159e517b21517d18.json
│ │ │ ├── request159fa95af878447538185c20cedbd92c.json
│ │ │ ├── request16d7d8f484a35cf5804f799fc6592d0b.json
│ │ │ ├── request18e1caaae1f91d18c754005f495ade4a.json
│ │ │ ├── request1bddc8fc32ddb8342e4bc48029eeddf1.json
│ │ │ ├── request1c86709bb6a5113c228f95eba201756c.json
│ │ │ ├── request1ce838a52895a8e0f92d5bb55bd34a39.json
│ │ │ ├── request1d4539a3acd22c90869eab6aa89349e3.json
│ │ │ ├── request21cb074ade64e87b2f347dcb5f3e1ca0.json
│ │ │ ├── request2799d7b0273add0629fbc071aefb6009.json
│ │ │ ├── request27dad63f70c50190d762787d5415fb1f.json
│ │ │ ├── request286b0ac010bfdb78f33dfd318679886a.json
│ │ │ ├── request2a045cde3970ab7b348df05e95e7b9c3.json
│ │ │ ├── request2cf5ebd3b922341e1de6d9831f8f6c79.json
│ │ │ ├── request2d4fd08fb9b3dcc46d38954586f8cab3.json
│ │ │ ├── request2f3646d722cf8712bd4a452a2768482f.json
│ │ │ ├── request363421aeeef6464692365989d32bb4f9.json
│ │ │ ├── request36fb828c98daf78a60a1d02431710592.json
│ │ │ ├── request3a4db3779266fe6fc7e31eead46d9996.json
│ │ │ ├── request3ad3d9a8afd809af0b2b00617d46758d.json
│ │ │ ├── request3ae2e32d798a86cd2605b23e17e8fb03.json
│ │ │ ├── request3b59bb4f49f8e379b9b054736bc6fb94.json
│ │ │ ├── request3ce9c60acb3eb164709a3f173c1fa3f2.json
│ │ │ ├── request3d02eb9418db9237797173d4f68b4425.json
│ │ │ ├── request404a1334920b60ed517c9383e2dcc32c.json
│ │ │ ├── request4329d6a92dec3a15646a3298c22755b0.json
│ │ │ ├── request43642a3bd1d558d1e0a4197c502075f5.json
│ │ │ ├── request443b19a6e8283a3bb5063918acfa3d6f.json
│ │ │ ├── request44b307c6f73d7e32328511a4bca9361f.json
│ │ │ ├── request456dd772d92da1c02ed5ca0d1b3400f9.json
│ │ │ ├── request46ded08f0698a95e461efdd890e29421.json
│ │ │ ├── request472fd6073bc51283417f418843277e18.json
│ │ │ ├── request4a0c2426dcbba307e6747466921d0ebb.json
│ │ │ ├── request4be739b5768d699cb118e94e9c73a7d6.json
│ │ │ ├── request4cc7e77d411ee5d32b4b68c559fd24eb.json
│ │ │ ├── request4d50dbaed5c59d9f8ed4b824a5fa7b4c.json
│ │ │ ├── request4e071d86397b95a0b0ad52aebb6b2e03.json
│ │ │ ├── request4fbbe5f6fe580bd5e55bbd60e8302c07.json
│ │ │ ├── request5010511210568f2494e7d715ddca3fe5.json
│ │ │ ├── request535b30f63a7e89e8fa2e17fff4a92b2f.json
│ │ │ ├── request53ced6371873432280aa8489c1b45f21.json
│ │ │ ├── request5678213359b65da6a1851eeaa706ff24.json
│ │ │ ├── request5711e73d9fdfbee2d67781cd43875f26.json
│ │ │ ├── request58c9a938f95c4444a0923d7c4b80aedf.json
│ │ │ ├── request5961d985671cd44ae28d46079a078af2.json
│ │ │ ├── request5c61457b1908e376ae7737adc2e3b19c.json
│ │ │ ├── request5d16500482e406ca27c4d57713fe3058.json
│ │ │ ├── request5dd997fbddd11bb0c5408ddd86b647d1.json
│ │ │ ├── request6314f68c62d451df39cff28d0105f250.json
│ │ │ ├── request659985875ffd9309df838437a1a2763b.json
│ │ │ ├── request65dc6b58f9c22777f12c1d2971b23523.json
│ │ │ ├── request65e287923a4ebf427e6a646c99e200ca.json
│ │ │ ├── request66b092215599bb11f8a03a3ff6a4eb3a.json
│ │ │ ├── request678cb7e6ab71f2441e6c2f5a917d37be.json
│ │ │ ├── request6942e2686a9fe4a5d47af94a897be7e6.json
│ │ │ ├── request6a14f7b7044f04669b2c08775f555232.json
│ │ │ ├── request6a7213dc0f42bdb7d52e861ee1ec6fc6.json
│ │ │ ├── request6b1d7d732da252ae69acdc3a3c2f6eee.json
│ │ │ ├── request6c6a6e62e91685350853b59ec792b962.json
│ │ │ ├── request6d08be7030b4cb7b9037efcdeb81972a.json
│ │ │ ├── request6d7cd2a1c692ce0886cdee9506101e89.json
│ │ │ ├── request6eb85d48e09f538f150400127fd73054.json
│ │ │ ├── request6efd87b3691c5bc5d90f6e638748dc98.json
│ │ │ ├── request6f8d6b283e5fe8b79e66975b2ed587a7.json
│ │ │ ├── request70a863d464f50abba7a86e6d46cb2873.json
│ │ │ ├── request717adad42d5d576152b1f6d809a3c8da.json
│ │ │ ├── request73d0ff7060259d01f1bdbbd7acda5686.json
│ │ │ ├── request77e65ffbd857c39cf14a9ad74279c7ba.json
│ │ │ ├── request7833cccde5be44847d2834c320efac2b.json
│ │ │ ├── request78dbb0af61a1e23a0f2614eb98bb46c0.json
│ │ │ ├── request78ee70188fa3e6dce58e75f8df9a701f.json
│ │ │ ├── request7c05dd05540a5377e1487ef4f0c54c48.json
│ │ │ ├── request7c0ed6f293c87c377c58c8d911aaa777.json
│ │ │ ├── request7dde687744f571fd6650ad7399203ac5.json
│ │ │ ├── request816449d2d775bc083cf300974bdc10af.json
│ │ │ ├── request85a1eff8ed194c127249a682db2d27cf.json
│ │ │ ├── request878bab10c211dd44cb4553f6dc484f83.json
│ │ │ ├── request895686a32c6921f666fe79c10493bb1f.json
│ │ │ ├── request8ac2bf9b09cc9383988a934fe691692a.json
│ │ │ ├── request8b7a3ed64b4a972e90f48ad347670813.json
│ │ │ ├── request8bc8f9c4da52c90d51b3e18e1300c6d4.json
│ │ │ ├── request8bfa8a8950c0bdfc209c49e531739006.json
│ │ │ ├── request8d2c2ca8df0fc30cb3152076a8af6016.json
│ │ │ ├── request90eccd55b0448292d8511e73985542d7.json
│ │ │ ├── request914b625be8999c92f5b0fb21cb5c39f4.json
│ │ │ ├── request91c941704f6cfc578724277dbb79d456.json
│ │ │ ├── request9228e718c64b256d661a1d93909708c7.json
│ │ │ ├── request9484a9be138ecb74c7241db00fd05dcd.json
│ │ │ ├── request95d170fa02a120482c2f0497c72d5716.json
│ │ │ ├── request9a319113c6ca13dad7540c7fd90825ba.json
│ │ │ ├── request9da53bdb54ed741dd7b73e22896e610a.json
│ │ │ ├── requesta3af76c3bf560d090aeb79bc6cdde208.json
│ │ │ ├── requesta473c17920ab76f366755aa775da6371.json
│ │ │ ├── requesta58fc4bd517e4a3f1a277f68287609f3.json
│ │ │ ├── requesta5eb6cf7f7a7e728b9137396b59150b0.json
│ │ │ ├── requestaa5e55819e3a43cca2b284c2119e7525.json
│ │ │ ├── requestaaedaa96766d75c664e8b3898af8365e.json
│ │ │ ├── requestad0c6bd76338f1bf498b16070275d04b.json
│ │ │ ├── requestaf28694ceb9c1d15492c7700c07306e6.json
│ │ │ ├── requestb0b099f6cc16db5524cb336b6373371e.json
│ │ │ ├── requestb0b66e7402bd021f6f6f81f69bf9ef18.json
│ │ │ ├── requestb112a918a2ece9a875d1c8d0856e1e68.json
│ │ │ ├── requestb2ea00c2300d04ad523903f37a562dff.json
│ │ │ ├── requestb417b5930a480b4bb07a2793b782c32d.json
│ │ │ ├── requestb90286425e6ad1f5a3e66eb9bfc5b528.json
│ │ │ ├── requestba369474db70c4ca2f99d1236c773532.json
│ │ │ ├── requestbac6a90eed6358050cc451b7346dbae5.json
│ │ │ ├── requestbb865103df394a5176b211859dfca415.json
│ │ │ ├── requestc236b51cddef2fe8297064984e04c805.json
│ │ │ ├── requestc39de7d52670682c117b785d51c8b4a6.json
│ │ │ ├── requestc61016e904bc4d53f10bf8a9d42b7c84.json
│ │ │ ├── requestc61cdb727bd2ab602ece911831deb892.json
│ │ │ ├── requestc64a55ad8b16703d13479ff3b11b70ec.json
│ │ │ ├── requestc9114e54aa19a8b53536ffee44a47797.json
│ │ │ ├── requestc9537f6814eae8f18ee5fc96495e50bb.json
│ │ │ ├── requestca27b0fb75992d8bbf6e9c9f6f84ba73.json
│ │ │ ├── requestcb0e3c415937bb510a07119d29d30f6c.json
│ │ │ ├── requestcb5f0c0bf31052204b28b68fd4464ac2.json
│ │ │ ├── requestcc779554821681f119c9f516e46e3572.json
│ │ │ ├── requestcce834252e64fa6189dbf804832284d6.json
│ │ │ ├── requestcea65b205ad7e24117413111443a5d21.json
│ │ │ ├── requestcf7ff46417f372533eec9ff30e85e53a.json
│ │ │ ├── requestcfd7a039b31a326a7f59903d43a0d82f.json
│ │ │ ├── requestd5a11b24c7329de1b599df1a3e5dd3a5.json
│ │ │ ├── requestd985fa8d172480fdad5e1d2593ad8bac.json
│ │ │ ├── requestd9f1692ebd3ee6eeae81298c1e555c97.json
│ │ │ ├── requestdafae46704002ad2c1a2e8bc9a8f6bd4.json
│ │ │ ├── requestdb4285900a117c954874542ae9a61712.json
│ │ │ ├── requestdba69f5aa7819199c2345b2e872bf817.json
│ │ │ ├── requeste0b867518c8f5765d221460aa462b9a1.json
│ │ │ ├── requeste0d1a0fc88ab2155bafe544f85f751bd.json
│ │ │ ├── requeste114a9f5fd19a44b1ec99394536dd4e9.json
│ │ │ ├── requeste335e05ef6904adc1c56772fef5b92c1.json
│ │ │ ├── requeste6809f076a1e32621a6124e017302856.json
│ │ │ ├── requeste6d7f90423e2ce1c3be3b513f67aed72.json
│ │ │ ├── requestf097e66ab00cfd403830fe9718723934.json
│ │ │ ├── requestf1a8064322aba584bed2936c03ef96e7.json
│ │ │ ├── requestf3acb9755ef5e82153b1ee6c24deff72.json
│ │ │ ├── requestf48c727eb8f636d8d5aec677e3379e98.json
│ │ │ ├── requestf58b3a2ad19557b466036841eb110ff0.json
│ │ │ ├── requestf6793717b5017cc15a746e90ce585cc3.json
│ │ │ ├── requestfa39f59c007048d21f5fcebb516a55c3.json
│ │ │ ├── requestfaea73719549e6087d5398b07d322976.json
│ │ │ ├── requestfb80e8b3c71c17a77857b7df855d5b7c.json
│ │ │ └── requestfce828ba2ccac19204c1194026c7390c.json
│ │ ├── config/
│ │ │ └── test_options.py
│ │ ├── data/
│ │ │ ├── __init__.py
│ │ │ ├── test_data_caching.py
│ │ │ ├── test_data_coordinate.py
│ │ │ ├── test_dataset.py
│ │ │ └── test_query.py
│ │ ├── datetime_/
│ │ │ ├── __init__.py
│ │ │ ├── test_date.py
│ │ │ ├── test_gscalendar.py
│ │ │ ├── test_point.py
│ │ │ ├── test_relative_date.py
│ │ │ └── test_time.py
│ │ ├── entities/
│ │ │ ├── test_entitlements.py
│ │ │ ├── test_group.py
│ │ │ └── test_user.py
│ │ ├── fixtures/
│ │ │ ├── __init__.py
│ │ │ └── content.py
│ │ ├── markets/
│ │ │ ├── __init__.py
│ │ │ ├── test_baskets.py
│ │ │ ├── test_close_market.py
│ │ │ ├── test_hedger.py
│ │ │ ├── test_instrument.py
│ │ │ ├── test_portfolio.py
│ │ │ ├── test_portfolio_manager.py
│ │ │ ├── test_position_set.py
│ │ │ ├── test_pricing_context.py
│ │ │ ├── test_report.py
│ │ │ ├── test_scenarios.py
│ │ │ └── test_securities.py
│ │ ├── mock_data_test_utils.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ ├── test_epidemiology.py
│ │ │ ├── test_risk_model.py
│ │ │ └── test_risk_model_utils.py
│ │ ├── resources/
│ │ │ ├── MA4B66MW5E27U8P32SB-xrefs.json
│ │ │ ├── MA4B66MW5E27U8P32SB.json
│ │ │ ├── MA4J1YB8XZP2BPT8-xrefs.json
│ │ │ ├── MA4J1YB8XZP2BPT8.json
│ │ │ ├── MA66CZBQJST05XKG-xrefs.json
│ │ │ ├── MA66CZBQJST05XKG.json
│ │ │ ├── MAJ6SEQH3GT0GA2Z-xrefs.json
│ │ │ ├── MAJ6SEQH3GT0GA2Z.json
│ │ │ ├── MAJNQPFGN1EBDHAE-xrefs.json
│ │ │ ├── MAJNQPFGN1EBDHAE.json
│ │ │ ├── MAK1FHKH5P5GJSHH-xrefs.json
│ │ │ ├── MAK1FHKH5P5GJSHH.json
│ │ │ ├── MARCRZHY163GQ4H3.json
│ │ │ ├── MASGTFZYNA7PMQ3H.json
│ │ │ ├── MATGYV0J9MPX534Z-xrefs.json
│ │ │ ├── MATGYV0J9MPX534Z.json
│ │ │ ├── MAYJPCVVF2RWXCES-xrefs.json
│ │ │ ├── MAYJPCVVF2RWXCES.json
│ │ │ ├── MAZ7RWC904JYHYPS-xrefs.json
│ │ │ ├── MAZ7RWC904JYHYPS.json
│ │ │ ├── MIDASER_SPX_USD.csv
│ │ │ ├── SPX_50_icorr_in.csv
│ │ │ ├── SPX_50_icorr_out.csv
│ │ │ ├── SPX_50_rcorr_in.csv
│ │ │ ├── SPX_50_rcorr_out.csv
│ │ │ ├── SPX_50_weights.csv
│ │ │ ├── Sharpe_SPX_0175.csv
│ │ │ ├── asset-query-USDJPY.json
│ │ │ ├── nobbid-xrefs.json
│ │ │ └── nobbid.json
│ │ ├── risk/
│ │ │ ├── test_measures.py
│ │ │ └── test_results.py
│ │ ├── test_base.py
│ │ ├── test_session.py
│ │ ├── timeseries/
│ │ │ ├── __init__.py
│ │ │ ├── multi_measure/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── test_commod.py
│ │ │ │ └── test_measure_registry.py
│ │ │ ├── test_algebra.py
│ │ │ ├── test_analysis.py
│ │ │ ├── test_backtesting.py
│ │ │ ├── test_datetime.py
│ │ │ ├── test_econometrics.py
│ │ │ ├── test_helper.py
│ │ │ ├── test_measures.py
│ │ │ ├── test_measures_countries.py
│ │ │ ├── test_measures_factset.py
│ │ │ ├── test_measures_fx_vol.py
│ │ │ ├── test_measures_inflation.py
│ │ │ ├── test_measures_portfolios.py
│ │ │ ├── test_measures_rates.py
│ │ │ ├── test_measures_reports.py
│ │ │ ├── test_measures_risk_models.py
│ │ │ ├── test_measures_xccy.py
│ │ │ ├── test_rolling.py
│ │ │ ├── test_statistics.py
│ │ │ ├── test_tca.py
│ │ │ ├── test_technicals.py
│ │ │ ├── test_timeseries.py
│ │ │ └── utils.py
│ │ ├── tracing/
│ │ │ ├── __init__.py
│ │ │ └── test_tracing.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── datagrid_test_utils.py
│ │ ├── mock_calc.py
│ │ ├── mock_data.py
│ │ ├── mock_request.py
│ │ ├── test_utilities.py
│ │ └── test_utils.py
│ ├── timeseries/
│ │ ├── __init__.py
│ │ ├── algebra.py
│ │ ├── analysis.py
│ │ ├── backtesting.py
│ │ ├── datetime.py
│ │ ├── econometrics.py
│ │ ├── helper.py
│ │ ├── measure_registry.py
│ │ ├── measures.py
│ │ ├── measures_countries.py
│ │ ├── measures_factset.py
│ │ ├── measures_fx_vol.py
│ │ ├── measures_helper.py
│ │ ├── measures_inflation.py
│ │ ├── measures_portfolios.py
│ │ ├── measures_rates.py
│ │ ├── measures_reports.py
│ │ ├── measures_risk_models.py
│ │ ├── measures_xccy.py
│ │ ├── statistics.py
│ │ ├── tca.py
│ │ └── technicals.py
│ ├── tracing/
│ │ ├── __init__.py
│ │ └── tracing.py
│ └── workflow/
│ ├── __init__.py
│ └── workflow.py
├── pyproject.toml
├── requirements.txt
├── setup.cfg
├── setup.py
└── versioneer.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
*.sh eol=lf
gs_quant/_version.py export-subst
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: ''
assignees: andyphillipsgs
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior with code example.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Systems setup:**
- OS: [e.g. Windows 10]
- Python version
- GS-Quant version [e.g. 0.7]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Describe the problem.**
A clear and concise description of the problem.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Are you willing to contribute**
Yes/No
**Additional context**
Add any other context or screenshots about the feature request here
================================================
FILE: .github/workflows/python-publish.yml
================================================
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*
================================================
FILE: .gitignore
================================================
*.pyc
gs_quant/.idea/
================================================
FILE: .gitlab-ci.yml
================================================
include:
- project: 'fp/open-source/os-ci'
file:
- '.gitlab-ci.yml'
variables:
CURL: /sw/gs/git-prod/dist/linux/bin/
GITLAB_SERVICES_HOME: /gns/area/certified/com/gs/gitlab/gitlab-services/gitlab-services-4.0
JAVA_HOME: /sw/external/jdk-11/
NODE: /gns/area/certified/external/org/nodejs/node.js/node_v12.21.0_linux_x64-12.21.0.gns/node_v12.21.0_linux_x64/node-v12.21.0-linux-x64/bin
GS_PYPI_URL: "http://pypi.site.gs.com/simple"
GS_PYPI_HOST: "pypi.site.gs.com"
stages:
- .pre
- test
- clmscan
- etch_upload
- .post
cloud_etch_upload:
stage: etch_upload
tags:
- linux
- default
- kubernetes
image: registry.aws.site.gs.com:443/dx/ete/cloudetch-uploader:current
script:
- "$CLOUD_ETCH_UPLOAD"
test:py39:
image: "registry.aws.site.gs.com:443/dsml/python/python-raw-image/python3.9-rhel8:current"
stage: test
tags: [ linux, default, kubernetes ]
before_script:
- export PYTHONPATH=.
- export PATH=$NODE:$CURL:$JAVA_HOME/bin:$GITLAB_SERVICES_HOME/scripts:$PATH
- python3 -V
- pip3 install -i $GS_PYPI_URL --trusted-host $GS_PYPI_HOST --upgrade pip
- pip3 install -i $GS_PYPI_URL --trusted-host $GS_PYPI_HOST .[test]
script:
- pytest -rsx gs_quant/test --junitxml=pytest.xml
artifacts:
when: always
paths:
- "pytest.xml"
================================================
FILE: .gs-project.yml
================================================
productGuid: "product::820010"
#etch section
etch:
testResultPaths:
- type: "JUNIT"
paths:
- "pytest.xml"
================================================
FILE: .pre-commit-config.yaml
================================================
# run pip install .[develop] to install dependencies
repos:
- repo: local
hooks:
- id: ruff-lint
name: Run ruff lint
language: system
types: [python]
files: 'gs_quant/.*py$'
entry: ruff check --fix
- id: ruff-format
name: Run ruff format
language: system
files: 'gs_quant/.*py$'
entry: ruff format
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at gs-oss-abuse@gs.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to gs-quant
This file contains information about reporting issues as well as contributing code. Make sure
you read our [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md) before you start participating.
# Development and Build Environment
gs-quant's development environment relies on the following:
### 1) Python 3.9+
Available at [Python.org](https://www.python.org/downloads/) or from your OS's package manager.
### 2) IDE
The main developers use [PyCharm](https://www.jetbrains.com/pycharm/) but you can use another IDE or editor.
Please do not commit IDE files.
# Issues
Search the issue tracker for a relevant issue or create a new one.
# Making changes
Fork the repository in GitHub and make changes in your fork.
Before you submit your first pull request, please first submit a DCO, per the instructions in the last section on this page.
Finally, submit a pull request. In your pull requests:
* Make sure you [rebase your fork](https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request) so that pull requests can be fast-forward merges.
* We generally prefer squashed commits, unless multi-commits add clarity or are required for mixed copyright commits.
* Your commit message for your code must contain a `covered by: <dco>` line. See above.
* Every file you modify should contain a single line with copyright information after the Apache header:
```
//Portions copyright <copyright holder>. Licensed under Apache 2.0 license
```
* New files must contain the standard Apache 2.0 header with appropriate copyright holder.
* If you're going to contribute code from other open source projects, commit that code first with `covered by: <license>`
where `<license>` is license of the code being committed. Ensure the file retains its original copyright notice and add an appropriate line to
NOTICE.txt in the same commit. You can then modify that code in subsequent commits with a reference to your DCO and copyright.
# Licensing
Please make sure that any new dependency licenses are listed in the following list of pre-approved licenses list:
```
MIT
ASL (all versions)
BSD
BSD-like
```
# Coding Style
Please see [PEP 8 - Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/).
# Appendix: Contribution Prerequisite: Submitting a DCO
If you have never contributed to gs-quant, or your copyright ownership has changed, you must first create a pull request that has
a developer certificate of origin (DCO) in it. To create this file, follow these steps:
For code you write, determine who the copyright owner is. If you are employed in the US, it's likely that your
employer can exert copyright ownership over your work, even if the work was not done during regular working hours or
using the employer's equipment. Copyright law is highly variable from jurisdiction to jurisdiction. Consult your
employer or a lawyer if you are not sure.
If you've determined that the copyright holder for the code you write is yourself,
please fill out the following (replace all `<>` terms); place it in a file under `dco/<your name>.dco`.
```
1) I, <your name>, certify that all work committed with the commit message
"covered by: <your name>.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from <date submitted> to 9999-01-01.
```
If you've determined that the copyright holder for the code you write is some other entity (e.g. your employer),
you must ensure that you are authorized by the copyright holder to be able to license this code under the
Apache 2.0 license for the purpose of contribution to gs-quant. Negotiating such authorization and administering
the terms is entirely between you and the copyright holder. Please fill out the following (replace all
`<>` terms); place it in a file under `dco/<copyright holder name>-<your name>.dco`.
```
1) I, <your name>, certify that all work committed with the commit message
"covered by: <copyright holder name>-<your name>.dco" is copyright
<copyright holder name> and that I am authorized by <copyright holder name>
to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from <date submitted> to 9999-01-01.
```
`<your name>` must reference your real name; we will not accept aliases, pseudonyms or anonymous contributions.
Issue a pull request with the appropriate DCO and a change to NOTICE.txt with
one line `This product contains code copyright <copyright holder name>, licensed under Apache 2.0 license`.
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: MANIFEST.in
================================================
include gs_quant/config.ini
include gs_quant/resources/asset-service.json
include gs_quant/resources/data-service.json
include gs_quant/resources/risk-service.json
include gs_quant/resources/certificates/*
include gs_quant/examples/*
include gs_quant/guides/*
include gs_quant/tutorials/*
include gs_quant/docs/*
include versioneer.py
include gs_quant/_version.py
================================================
FILE: NOTICE
================================================
gs-quant
Copyright 2018 Goldman Sachs
================================================
FILE: NOTICE.txt
================================================
gs-quant
Copyright 2018-2019 Goldman Sachs
This product contains code copyright Scott Weinstein, licensed under Apache 2.0 license
================================================
FILE: README.md
================================================
# GS Quant
**GS Quant** is a Python toolkit for quantitative finance, created on top of one of the world’s most powerful risk transfer platforms. Designed to accelerate development of quantitative trading strategies and risk management solutions, crafted over 25 years of experience navigating global markets.
It is created and maintained by quantitative developers (quants) at Goldman Sachs to enable the development of trading strategies and analysis of derivative products. GS Quant can be used to facilitate derivative structuring, trading, and risk management, or as a set of statistical packages for data analytics applications.
In order to access the APIs you will need a client id and secret. These are available to institutional clients of Goldman Sachs. Please speak to your sales coverage or Marquee Sales for further information.
Please refer to [Goldman Sachs Developer](https://developer.gs.com/docs/gsquant/) for additional information.
## Requirements
* Python 3.9 or greater
* Access to PIP package manager
## Installation
```
pip install gs-quant
```
## Examples
You can find examples, guides and tutorials in the respective folders on [Goldman Sachs Developer](https://developer.gs.com/docs/gsquant/).
## Help
Please reach out to `gs-quant@gs.com` with any questions, comments or feedback.
================================================
FILE: SKILL.md
================================================
---
name: gs-quant
description: This document covers the core workflows for using the `gs_quant` library: establishing a session, constructing and resolving instruments, building portfolios, pricing historically, and extracting results. For backtesting, see the dedicated guide at `gs_quant/backtests/SKILL.md`.
# SKILL.md — gs_quant Usage Guide
This document covers the core workflows for using the `gs_quant` library: establishing a session, constructing and resolving instruments, building portfolios, pricing historically, and extracting results.
> **Backtesting:** For a comprehensive guide to the backtesting framework (engines, triggers, actions, strategies, and result extraction), see [`gs_quant/backtests/SKILL.md`](gs_quant/backtests/SKILL.md).
---
## 1. Creating a Session with `GsSession.use`
All API communication in `gs_quant` flows through an authenticated `GsSession`. Before making any pricing or data calls you must initialise a session with `GsSession.use()`.
### OAuth2 (Application Credentials)
```python
from gs_quant.session import GsSession, Environment
GsSession.use(
environment_or_domain=Environment.PROD,
client_id='my_client_id',
client_secret='my_client_secret',
scopes=('run_analytics',)
)
```
- **`environment_or_domain`** — `Environment.PROD` (default), `Environment.QA`, or `Environment.DEV`. You can also pass a raw URL string.
- **`client_id` / `client_secret`** — OAuth2 application credentials. When both are provided the library creates an `OAuth2Session`.
- **`scopes`** — Optional iterable of `GsSession.Scopes` values. Usually when pricing trade you will need `RUN_ANALYTICS`.
### Kerberos / SSO (Internal GS)
If no `client_id` is supplied, the library will attempt Kerberos or pass-through authentication automatically:
This is for internal GS users only and requires appropriate network access and installation of gs_quant_internal.
```python
GsSession.use(Environment.PROD)
```
### Using as a Context Manager
`GsSession` can also be used as a context manager so the session is cleaned up on exit:
```python
with GsSession.get(Environment.PROD, client_id='...', client_secret='...') as session:
# session is active inside this block
...
```
### Verifying the Session
After calling `GsSession.use(...)`, the active session is accessible as:
```python
GsSession.current # the currently active GsSession instance
```
All subsequent API calls (instrument resolution, pricing, data queries) will use this session automatically.
---
## 2. Constructing Trades with `gs_quant.instrument`
Instruments are the building blocks of gs_quant. Every tradeable product is represented as a dataclass in `gs_quant.instrument`. Construct an instrument by importing its class and supplying the key economic parameters — any parameter you omit will be resolved by the server later.
### Common Instrument Examples
#### Interest Rate Swap
```python
from gs_quant.instrument import IRSwap
swap = IRSwap(
pay_or_receive='Pay', # 'Pay' or 'Receive' the fixed leg
termination_date='10y', # tenor or explicit date
notional_currency='USD', # currency
fixed_rate=0.03, # optional — leave None to resolve at market
)
```
#### Interest Rate Swaption
```python
from gs_quant.instrument import IRSwaption
swaption = IRSwaption(
pay_or_receive='Receive',
termination_date='10y',
notional_currency='EUR',
expiration_date='1y',
strike='ATM',
)
```
#### Interest Rate Cap
```python
from gs_quant.instrument import IRCap
cap = IRCap(
termination_date='1y',
notional_currency='USD',
)
```
#### FX Option
```python
from gs_quant.instrument import FXOption
option = FXOption(
pair='EURUSD',
expiration_date='3m',
option_type='Call',
strike_price='ATMF',
notional_amount=10e6,
)
```
#### FX Forward
```python
from gs_quant.instrument import FXForward
fwd = FXForward(
pair='USDJPY',
settlement_date='6m',
notional_amount=10e6,
)
```
### Important: FX Instrument Pitfalls
There are two common mistakes when working with FX options that can lead to confusing results:
#### 1. Always Set `premium=0` on FX Options
When constructing FX options (FXOption, FXBinary, FXMultiCrossBinary, etc.), if you don't specify a `premium`, the instrument resolution will automatically set a premium such that the `DollarPrice` becomes zero. This is by design — it represents a "fair value" trade where the premium exactly offsets the option value.
**Problem:** If you want to know the cost/value of the option, you'll always get 0.
**Solution:** Always set `premium=0` explicitly when you want `DollarPrice` to return the actual option value:
```python
from gs_quant.instrument import FXOption, FXBinary
# WRONG - DollarPrice will be ~0 after resolution
option_wrong = FXOption(
pair='EURUSD',
expiration_date='3m',
option_type='Call',
strike_price='ATMF',
notional_amount=10e6,
)
# CORRECT - DollarPrice will be the option value
option_correct = FXOption(
pair='EURUSD',
expiration_date='3m',
option_type='Call',
strike_price='ATMF',
notional_amount=10e6,
premium=0, # <-- Important!
)
# Same applies to FXBinary
binary = FXBinary(
pair='EURUSD',
buy_sell=BuySell.Buy,
option_type=OptionType.Call,
strike_price='s',
notional_amount=1e6,
notional_currency=Currency.USD,
expiration_date='3m',
premium=0, # <-- Important!
)
```
#### 2. FXMultiCrossBinaryLeg Uses Different OptionType Values
When constructing `FXMultiCrossBinaryLeg` objects (used within `FXMultiCrossBinary` for dual digital options), you must use `OptionType.Binary_Call` or `OptionType.Binary_Put` — **not** `OptionType.Call` or `OptionType.Put`.
This is different from `FXBinary` which uses `OptionType.Call` / `OptionType.Put`.
```python
from gs_quant.instrument import FXBinary, FXMultiCrossBinary, FXMultiCrossBinaryLeg
from gs_quant.common import BuySell, OptionType, Currency
# FXBinary uses OptionType.Call / OptionType.Put
single_digital = FXBinary(
pair='EURUSD',
buy_sell=BuySell.Buy,
option_type=OptionType.Call, # <-- Call or Put
strike_price='s',
notional_amount=1e6,
notional_currency=Currency.USD,
expiration_date='3m',
premium=0,
)
# FXMultiCrossBinaryLeg uses OptionType.Binary_Call / OptionType.Binary_Put
dual_digital = FXMultiCrossBinary(
legs=(
FXMultiCrossBinaryLeg(
pair='EURUSD',
option_type=OptionType.Binary_Call, # <-- Binary_Call or Binary_Put
strike_price='s',
),
FXMultiCrossBinaryLeg(
pair='USDJPY',
option_type=OptionType.Binary_Call, # <-- Binary_Call or Binary_Put
strike_price='s',
),
),
buy_sell=BuySell.Buy,
notional_amount=1e6,
notional_currency=Currency.USD,
expiration_date='3m',
premium=0, # <-- Don't forget this too!
)
```
#### Equity Option
```python
from gs_quant.instrument import EqOption
eq_opt = EqOption(
underlier='.SPX',
expiration_date='3m',
strike_price='ATMF',
option_type='Call',
option_style='European',
)
```
You can set the instrument `name` property for easy identification later:
```python
swap.name = 'USD 10y Payer'
```
---
## 3. Resolving an Instrument
When you construct an instrument you typically only specify a subset of its parameters. **Resolving** fills in all remaining fields by sending the instrument to the GS pricing service, which returns a fully specified version based on current market data.
```python
from gs_quant.instrument import IRSwap
swap = IRSwap('Pay', '10y', 'USD')
# Before resolve: swap.fixed_rate is None
swap.resolve()
# After resolve: swap.fixed_rate is now populated with the current par rate
print(swap.fixed_rate) # e.g. 0.0345
```
### What `resolve()` Does
1. Sends the instrument to the GS analytics service along with the current `PricingContext` (pricing date and market).
2. The service computes any missing parameters — for example the fixed rate of a par swap, the premium of an option, or the forward points of an FX forward.
3. By default (`in_place=True`), the instrument is updated in place. Pass `in_place=False` to receive a new resolved copy instead.
### Resolve Under a Specific Pricing Date
```python
from gs_quant.markets import PricingContext
import datetime as dt
with PricingContext(pricing_date=dt.date(2025, 1, 15)):
resolved = swap.resolve(in_place=False)
resolved_swap = resolved.result()
```
### Historical Resolution
Resolution can be done across multiple dates via `HistoricalPricingContext`, but `in_place` must be `False`:
```python
from gs_quant.markets import HistoricalPricingContext
import datetime as dt
with HistoricalPricingContext(dt.date(2025, 1, 1), dt.date(2025, 1, 31)):
resolved_by_date = swap.resolve(in_place=False)
# resolved_by_date is a dict of {date: resolved_instrument}
```
---
## 4. Combining Instruments in Portfolios
The `Portfolio` class groups instruments together so you can price, resolve, and analyse them as a single unit.
### Creating a Portfolio
```python
from gs_quant.instrument import IRSwap, IRSwaption
from gs_quant.markets.portfolio import Portfolio
swap = IRSwap('Pay', '10y', 'USD', name='USD 10y Payer')
swaption = IRSwaption('Receive', '10y', 'EUR', expiration_date='1y', name='EUR 1y10y Receiver')
portfolio = Portfolio([swap, swaption], name='My Portfolio')
```
You can also construct a portfolio from a dictionary (keys become instrument names):
```python
portfolio = Portfolio({
'USD 10y Payer': IRSwap('Pay', '10y', 'USD'),
'EUR 5y Receiver': IRSwap('Receive', '5y', 'EUR'),
})
```
### Nesting Portfolios
Portfolios can contain other portfolios, creating a hierarchy:
```python
usd_book = Portfolio([IRSwap('Pay', '5y', 'USD'), IRSwap('Receive', '10y', 'USD')], name='USD Book')
eur_book = Portfolio([IRSwap('Pay', '5y', 'EUR')], name='EUR Book')
master = Portfolio([usd_book, eur_book], name='Master Book')
```
### Portfolio Operations
```python
# Add instruments
portfolio.append(IRSwap('Pay', '2y', 'GBP'))
# Iterate
for instrument in portfolio:
print(instrument)
# Access by index
first = portfolio[0]
# Access by name
usd_swap = portfolio['USD 10y Payer']
# Number of top-level priceables
len(portfolio)
# All instruments across nested portfolios
portfolio.all_instruments
```
### Resolving a Portfolio
```python
portfolio.resolve() # resolves all instruments in place
```
### Pricing a Portfolio
```python
from gs_quant.risk import DollarPrice, IRDelta
# Single risk measure
prices = portfolio.calc(DollarPrice)
# Multiple risk measures at once
results = portfolio.calc([DollarPrice, IRDelta])
```
The result is a `PortfolioRiskResult` which can be sliced by instrument, risk measure, or date (see section 6).
---
## 5. Historical Pricing with `HistoricalPricingContext`
`HistoricalPricingContext` lets you compute risk measures across a range of dates using the close-of-business market for each date.
### Basic Usage
```python
import datetime as dt
from gs_quant.instrument import IRSwap
from gs_quant.markets import HistoricalPricingContext
from gs_quant.risk import DollarPrice
swap = IRSwap('Pay', '10y', 'USD')
with HistoricalPricingContext(dt.date(2025, 1, 2), dt.date(2025, 1, 31)):
price_f = swap.price()
price_series = price_f.result() # a pandas Series indexed by date
```
### By Number of Business Days
Pass an integer to price over the last N business days:
```python
with HistoricalPricingContext(10):
price_f = swap.price()
price_series = price_f.result()
```
### With Custom Date List
```python
dates = [dt.date(2025, 1, 2), dt.date(2025, 3, 15), dt.date(2025, 6, 30)]
with HistoricalPricingContext(dates=dates):
price_f = swap.price()
```
### Key Parameters
| Parameter | Description |
|---|---|
| `start` | Start date (or number of business days back from today) |
| `end` | End date (defaults to today) |
| `calendars` | Holiday calendar(s) for date generation |
| `dates` | Explicit iterable of dates (mutually exclusive with `start`) |
| `is_batch` | Use batch mode for long-running calculations (avoids timeouts) |
| `is_async` | Return immediately without blocking |
| `show_progress` | Display a tqdm progress bar |
| `market_data_location` | `'NYC'`, `'LDN'`, or `'HKG'` (defaults to `'LDN'`) |
| `csa_term` | CSA term for discounting |
### Historical Pricing with Portfolios
```python
with HistoricalPricingContext(dt.date(2025, 1, 2), dt.date(2025, 1, 31)):
result = portfolio.calc(DollarPrice)
# result is a PortfolioRiskResult with a date dimension
```
## 6. Result Extraction
Calculation results in gs_quant are rich typed objects that carry metadata (risk key, unit, error info) alongside the actual values. Understanding the result types and how to extract data from them is essential.
### Result Types
| Type | Description |
|---|---|
| `FloatWithInfo` | Scalar result (e.g. present value). Behaves like a `float` but carries a `risk_key` and `unit`. |
| `SeriesWithInfo` | Time series result (historical pricing). A `pandas.Series` with metadata. |
| `DataFrameWithInfo` | Structured/bucketed result (e.g. delta ladder). A `pandas.DataFrame` with metadata. |
| `ErrorValue` | Indicates a calculation error. Check `.error` for the message. |
| `MultipleRiskMeasureResult` | Dict-like mapping of `RiskMeasure → result` when multiple measures are requested on a single instrument. |
| `PortfolioRiskResult` | Result for a portfolio — can be sliced by instrument, risk measure, or date. |
### Single Instrument Results
```python
from gs_quant.instrument import IRSwap
from gs_quant.risk import DollarPrice, IRDelta
swap = IRSwap('Pay', '10y', 'USD')
# Scalar result
price = swap.dollar_price() # FloatWithInfo
print(float(price)) # the numeric value
# Local currency price
local_price = swap.price() # FloatWithInfo
# Structured result
delta = swap.calc(IRDelta) # DataFrameWithInfo — a bucketed delta ladder
print(delta) # displays as a DataFrame with columns like mkt_type, mkt_asset, etc.
```
### Using Futures (Async / Batched)
Inside an entered `PricingContext`, calculations return `PricingFuture` objects. Call `.result()` after exiting the context:
```python
from gs_quant.markets import PricingContext
with PricingContext():
price_f = swap.dollar_price()
delta_f = swap.calc(IRDelta)
price = price_f.result() # FloatWithInfo
delta = delta_f.result() # DataFrameWithInfo
```
### Multiple Risk Measures on a Single Instrument
```python
from gs_quant.risk import DollarPrice, IRDelta, IRVega
result = swap.calc([DollarPrice, IRDelta, IRVega]) # MultipleRiskMeasureResult
price = result[DollarPrice] # FloatWithInfo
delta = result[IRDelta] # DataFrameWithInfo
vega = result[IRVega] # DataFrameWithInfo
```
### Portfolio Results
`portfolio.calc()` returns a `PortfolioRiskResult` which supports flexible slicing:
```python
from gs_quant.risk import DollarPrice, IRDelta
result = portfolio.calc([DollarPrice, IRDelta])
# Slice by risk measure
prices = result[DollarPrice] # PortfolioRiskResult for DollarPrice only
# Slice by instrument (name or object)
swap_result = result['USD 10y Payer'] # MultipleRiskMeasureResult for that instrument
swap_price = swap_result[DollarPrice] # FloatWithInfo
# Slice by index
first_result = result[0]
# Iterate over instruments
for instrument_result in result:
print(instrument_result)
# Aggregate across all instruments
total_price = result[DollarPrice].aggregate() # sums all instrument prices
```
### Historical Results
When using `HistoricalPricingContext`, scalar results become time series:
```python
import datetime as dt
from gs_quant.markets import HistoricalPricingContext
with HistoricalPricingContext(dt.date(2025, 1, 2), dt.date(2025, 1, 31)):
price_f = swap.price()
price_series = price_f.result() # SeriesWithInfo indexed by date
print(price_series)
# Access value for a specific date
jan_15_price = price_series[dt.date(2025, 1, 15)]
```
Historical portfolio results can also be sliced by date:
```python
with HistoricalPricingContext(dt.date(2025, 1, 2), dt.date(2025, 1, 31)):
result = portfolio.calc(DollarPrice)
# Slice by date
jan_15 = result[dt.date(2025, 1, 15)] # PortfolioRiskResult for that single date
# Available dates
result.dates # tuple of dt.date
```
### Converting to DataFrames
All result types support conversion to pandas DataFrames:
```python
# Portfolio result to DataFrame (pivoted)
df = result.to_frame()
# Unpivoted (raw records)
df_raw = result.to_frame(values=None, index=None, columns=None)
# Custom pivoting
df_custom = result.to_frame(values='value', index='dates', columns='instrument_name')
```
`MultipleRiskMeasureResult` also supports `.to_frame()`:
```python
multi_result = swap.calc([DollarPrice, IRDelta])
df = multi_result.to_frame()
```
### Checking for Errors
```python
from gs_quant.risk import ErrorValue
price = swap.dollar_price()
if isinstance(price, ErrorValue):
print(f'Calculation failed: {price.error}')
else:
print(f'Price: {float(price)}')
```
### Arithmetic on Results
Results support arithmetic operations, which is useful for computing P&L or scaling:
```python
# Multiply portfolio result by a scalar
scaled = result * 1000
# Add results from different portfolios
combined = result_a + result_b
```
---
## 7. Backtesting
gs_quant includes a full backtesting framework under `gs_quant.backtests`. It lets you define trading strategies as combinations of **triggers** (when to act) and **actions** (what to do), then simulate them historically using one of several engines.
For the complete backtesting guide — including all trigger types, action types, engine selection, and result extraction — see:
📄 **[`gs_quant/backtests/SKILL.md`](gs_quant/backtests/SKILL.md)**
### Quick Example — Monthly FX Option Roll
```python
from datetime import date
from gs_quant.instrument import FXOption
from gs_quant.common import BuySell, OptionType
from gs_quant.backtests.triggers import PeriodicTrigger, PeriodicTriggerRequirements
from gs_quant.backtests.actions import AddTradeAction
from gs_quant.backtests.generic_engine import GenericEngine
from gs_quant.backtests.strategy import Strategy
from gs_quant.risk import Price
start_date = date(2023, 1, 3)
end_date = date(2024, 12, 31)
call = FXOption(
buy_sell=BuySell.Buy, option_type=OptionType.Call,
pair='USDJPY', strike_price='ATMF', expiration_date='2y',
name='2y_call', premium=0,
)
trig_req = PeriodicTriggerRequirements(start_date=start_date, end_date=end_date, frequency='1m')
action = AddTradeAction(call, '1m')
trigger = PeriodicTrigger(trig_req, action)
strategy = Strategy(None, trigger)
GE = GenericEngine()
backtest = GE.run_backtest(strategy, start=start_date, end=end_date, frequency='1b', show_progress=True)
# View results
backtest.result_summary['Total'].plot(title='Performance')
```
================================================
FILE: conftest.py
================================================
# This import is needed to register the magic pylint hooks to make it skip the integration tests
# flake8: noqa
# pylint: disable=wildcard-import, unused-wildcard-import
from gs_quant.test.mock_data_test_utils import *
================================================
FILE: dco/Bryan Galindo.dco
================================================
1) I, Bryan Galindo, certify that all work committed with the commit message
"covered by: Bryan Galindo.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from 2022-08-30 to 9999-01-01.
================================================
FILE: dco/Grant McGovern.dco
================================================
1) I, Grant McGovern, certify that all work committed with the commit message
"covered by: Grant McGovern.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from 2019-05-14 to 9999-01-01.
================================================
FILE: dco/Maverick Lin.dco
================================================
1) I, Maverick Lin, certify that all work committed with the commit message
"covered by: Maverick Lin.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from 2019-05-14 to 9999-01-01.
================================================
FILE: dco/Scott Weinstein.dco
================================================
1) I, Scott Weinstein, certify that all work committed with the commit message
"covered by: Scott Weinstein.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from 2019-05-08 to 9999-01-01.
================================================
FILE: docs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
================================================
FILE: docs/README.md
================================================
# Overview
Sphinx-generated documentation for gs-quant codebase
If you're looking for tutorials and other developer docs, check out [the developer-site repo](https://gitlab.gs.com/marquee/aurora/developer-site/).
# Important Links
- [GS Developer Marketing](https://developer.gs.com/discover/products/gs-quant/)
- [GS Developer Docs](https://developer.gs.com/docs/gsquant/)
# Contacts
- Symphony room: gs_quant, GS Developer Site
- Distribution list: gs-quant@gs.com
================================================
FILE: docs/_build/html/.buildinfo
================================================
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a31b8105bdf16238d68e5a89b0da3f8a
tags: 645f666f9bcd5a90fca523b33c5a78b7
================================================
FILE: docs/_build/html/_modules/aenum.html
================================================
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>aenum — gs_quant 0.1 documentation</title>
<script crossorigin src="/resources/react/16-8-6/prod/react.production.min.js"></script>
<script
crossorigin src="/resources/react/16-8-6/prod/react-dom.production.min.js"></script>
<script src='/resources/mathjax/latest.js?config=TeX-AMS-MML_HTMLorMML' async></script>
<script type="text/javascript" src="../_static/../../../auto-mount.js"></script>
<link rel="stylesheet" href="../_static/../../../auto-mount.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
</head>
<!-- Hello from the future. -->
<div id="mq-doc-navbar-inject"></div>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<a data-toggle="wy-nav-top" id="gs-developer-action-button-container" ontouchstart="">
<div data-toggle="gs-nav-action" id="gs-nav-action"></div>
</a>
<nav id="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Packages</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../data.html">Data Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../datetime.html">Datetime Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../instrument.html">Instrument Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../markets.html">Markets Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../models.html">Models Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../risk.html">Risk Package</a></li>
<li class="toctree-l1"><a class="reference internal" href="../timeseries.html">Timeseries Package</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Packages</a> /</li>
<li><a href="index.html">Module code</a> /</li>
<li>aenum</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Source code for aenum</h1><div class="highlight"><pre>
<span></span><span class="sd">"""Python Advanced Enumerations & NameTuples"""</span>
<span class="kn">import</span> <span class="nn">sys</span> <span class="k">as</span> <span class="nn">_sys</span>
<span class="n">pyver</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1">.</span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="n">_sys</span><span class="o">.</span><span class="n">version_info</span><span class="p">[:</span><span class="mi">2</span><span class="p">])</span>
<span class="kn">import</span> <span class="nn">re</span>
<span class="k">try</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">OrderedDict</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="n">OrderedDict</span> <span class="o">=</span> <span class="nb">dict</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">defaultdict</span>
<span class="k">try</span><span class="p">:</span>
<span class="kn">import</span> <span class="nn">sqlite3</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="n">sqlite3</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="n">pyver</span> <span class="o">>=</span> <span class="mi">3</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">reduce</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="n">or_</span> <span class="k">as</span> <span class="n">_or_</span><span class="p">,</span> <span class="n">and_</span> <span class="k">as</span> <span class="n">_and_</span><span class="p">,</span> <span class="n">xor</span> <span class="k">as</span> <span class="n">_xor_</span><span class="p">,</span> <span class="n">inv</span> <span class="k">as</span> <span class="n">_inv_</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="nb">abs</span> <span class="k">as</span> <span class="n">_abs_</span><span class="p">,</span> <span class="n">add</span> <span class="k">as</span> <span class="n">_add_</span><span class="p">,</span> <span class="n">floordiv</span> <span class="k">as</span> <span class="n">_floordiv_</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="n">lshift</span> <span class="k">as</span> <span class="n">_lshift_</span><span class="p">,</span> <span class="n">rshift</span> <span class="k">as</span> <span class="n">_rshift_</span><span class="p">,</span> <span class="n">mod</span> <span class="k">as</span> <span class="n">_mod_</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="n">mul</span> <span class="k">as</span> <span class="n">_mul_</span><span class="p">,</span> <span class="n">neg</span> <span class="k">as</span> <span class="n">_neg_</span><span class="p">,</span> <span class="n">pos</span> <span class="k">as</span> <span class="n">_pos_</span><span class="p">,</span> <span class="nb">pow</span> <span class="k">as</span> <span class="n">_pow_</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="n">truediv</span> <span class="k">as</span> <span class="n">_truediv_</span><span class="p">,</span> <span class="n">sub</span> <span class="k">as</span> <span class="n">_sub_</span>
<span class="k">if</span> <span class="n">pyver</span> <span class="o"><</span> <span class="mi">3</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="n">div</span> <span class="k">as</span> <span class="n">_div_</span>
<span class="k">if</span> <span class="n">pyver</span> <span class="o">>=</span> <span class="mi">3</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">inspect</span> <span class="kn">import</span> <span class="n">getfullargspec</span>
<span class="k">def</span> <span class="nf">getargspec</span><span class="p">(</span><span class="n">method</span><span class="p">):</span>
<span class="n">args</span><span class="p">,</span> <span class="n">varargs</span><span class="p">,</span> <span class="n">keywords</span><span class="p">,</span> <span class="n">defaults</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">_</span> <span class="o">=</span> <span class="n">getfullargspec</span><span class="p">(</span><span class="n">method</span><span class="p">)</span>
<span class="k">return</span> <span class="n">args</span><span class="p">,</span> <span class="n">varargs</span><span class="p">,</span> <span class="n">keywords</span><span class="p">,</span> <span class="n">defaults</span>
<span class="k">else</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">inspect</span> <span class="kn">import</span> <span class="n">getargspec</span>
<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span>
<span class="s1">'NamedConstant'</span><span class="p">,</span> <span class="s1">'constant'</span><span class="p">,</span> <span class="s1">'skip'</span><span class="p">,</span> <span class="s1">'nonmember'</span><span class="p">,</span> <span class="s1">'member'</span><span class="p">,</span> <span class="s1">'no_arg'</span><span class="p">,</span>
<span class="s1">'Enum'</span><span class="p">,</span> <span class="s1">'IntEnum'</span><span class="p">,</span> <span class="s1">'AutoNumberEnum'</span><span class="p">,</span> <span class="s1">'OrderedEnum'</span><span class="p">,</span> <span class="s1">'UniqueEnum'</span><span class="p">,</span>
<span class="s1">'StrEnum'</span><span class="p">,</span> <span class="s1">'UpperStrEnum'</span><span class="p">,</span> <span class="s1">'LowerStrEnum'</span><span class="p">,</span>
<span class="s1">'Flag'</span><span class="p">,</span> <span class="s1">'IntFlag'</span><span class="p">,</span>
<span class="s1">'AutoNumber'</span><span class="p">,</span> <span class="s1">'MultiValue'</span><span class="p">,</span> <span class="s1">'NoAlias'</span><span class="p">,</span> <span class="s1">'Unique'</span><span class="p">,</span>
<span class="s1">'enum'</span><span class="p">,</span> <span class="s1">'extend_enum'</span><span class="p">,</span> <span class="s1">'unique'</span><span class="p">,</span> <span class="s1">'enum_property'</span><span class="p">,</span>
<span class="s1">'NamedTuple'</span><span class="p">,</span> <span class="s1">'SqliteEnum'</span><span class="p">,</span>
<span class="p">]</span>
<span class="k">if</span> <span class="n">sqlite3</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">__all__</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="s1">'SqliteEnum'</span><span class="p">)</span>
<span class="n">version</span> <span class="o">=</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">4</span>
<span class="k">try</span><span class="p">:</span>
<span class="nb">any</span>
<span class="k">except</span> <span class="ne">NameError</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">any</span><span class="p">(</span><span class="n">iterable</span><span class="p">):</span>
<span class="k">for</span> <span class="n">element</span> <span class="ow">in</span> <span class="n">iterable</span><span class="p">:</span>
<span class="k">if</span> <span class="n">element</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">True</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">basestring</span>
<span class="k">except</span> <span class="ne">NameError</span><span class="p">:</span>
<span class="c1"># In Python 2 basestring is the ancestor of both str and unicode</span>
<span class="c1"># in Python 3 it's just str, but was missing in 3.1</span>
<span class="n">basestring</span> <span class="o">=</span> <span class="nb">str</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">unicode</span>
<span class="k">except</span> <span class="ne">NameError</span><span class="p">:</span>
<span class="c1"># In Python 3 unicode no longer exists (it's just str)</span>
<span class="n">unicode</span> <span class="o">=</span> <span class="nb">str</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">long</span>
<span class="n">baseinteger</span> <span class="o">=</span> <span class="nb">int</span><span class="p">,</span> <span class="n">long</span>
<span class="k">except</span> <span class="ne">NameError</span><span class="p">:</span>
<span class="n">baseinteger</span> <span class="o">=</span> <span class="nb">int</span>
<span class="c1"># deprecated</span>
<span class="n">baseint</span> <span class="o">=</span> <span class="n">baseinteger</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">NoneType</span>
<span class="k">except</span> <span class="ne">NameError</span><span class="p">:</span>
<span class="n">NoneType</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="kc">None</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="c1"># derive from stdlib enum if possible</span>
<span class="kn">import</span> <span class="nn">enum</span>
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">enum</span><span class="p">,</span> <span class="s1">'version'</span><span class="p">):</span>
<span class="n">StdlibEnumMeta</span> <span class="o">=</span> <span class="n">StdlibEnum</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">else</span><span class="p">:</span>
<span class="kn">from</span> <span class="nn">enum</span> <span class="kn">import</span> <span class="n">EnumMeta</span> <span class="k">as</span> <span class="n">StdlibEnumMeta</span><span class="p">,</span> <span class="n">Enum</span> <span class="k">as</span> <span class="n">StdlibEnum</span>
<span class="k">del</span> <span class="n">enum</span>
<span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
<span class="n">StdlibEnumMeta</span> <span class="o">=</span> <span class="n">StdlibEnum</span> <span class="o">=</span> <span class="kc">None</span>
<span class="c1"># will be exported later</span>
<span class="n">AutoValue</span> <span class="o">=</span> <span class="n">AutoNumber</span> <span class="o">=</span> <span class="n">MultiValue</span> <span class="o">=</span> <span class="n">NoAlias</span> <span class="o">=</span> <span class="n">Unique</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">class</span> <span class="nc">enum_property</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">"""</span>
<span class="sd"> This is a descriptor, used to define attributes that act differently</span>
<span class="sd"> when accessed through an enum member and through an enum class.</span>
<span class="sd"> Instance access is the same as property(), but access to an attribute</span>
<span class="sd"> through the enum class will look in the class' _member_map_.</span>
<span class="sd"> """</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fget</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">doc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fget</span> <span class="o">=</span> <span class="n">fget</span>
<span class="bp">self</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">=</span> <span class="n">doc</span> <span class="ow">or</span> <span class="n">fget</span><span class="o">.</span><span class="vm">__doc__</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">func</span><span class="p">,</span> <span class="n">doc</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fget</span> <span class="o">=</span> <span class="n">func</span>
<span class="bp">self</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__doc__</span> <span class="ow">or</span> <span class="n">doc</span> <span class="ow">or</span> <span class="n">func</span><span class="o">.</span><span class="vm">__doc__</span>
<span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">instance</span><span class="p">,</span> <span class="n">ownerclass</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">if</span> <span class="n">instance</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">return</span> <span class="n">ownerclass</span><span class="o">.</span><span class="n">_member_map_</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%r</span><span class="s1"> not found in </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">ownerclass</span><span class="o">.</span><span class="vm">__name__</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fget</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">fget</span><span class="p">(</span><span class="n">instance</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># search through mro</span>
<span class="k">for</span> <span class="n">base</span> <span class="ow">in</span> <span class="n">ownerclass</span><span class="o">.</span><span class="vm">__mro__</span><span class="p">[</span><span class="mi">1</span><span class="p">:]:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="ow">in</span> <span class="n">base</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">:</span>
<span class="n">attr</span> <span class="o">=</span> <span class="n">base</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">]</span>
<span class="k">break</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%r</span><span class="s1"> not found in </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="n">instance</span><span class="p">))</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">attr</span><span class="p">,</span> <span class="nb">classmethod</span><span class="p">):</span>
<span class="n">attr</span> <span class="o">=</span> <span class="n">attr</span><span class="o">.</span><span class="vm">__func__</span>
<span class="k">return</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">:</span> <span class="n">attr</span><span class="p">(</span><span class="n">ownerclass</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">)</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">attr</span><span class="p">,</span> <span class="nb">staticmethod</span><span class="p">):</span>
<span class="k">return</span> <span class="n">attr</span><span class="o">.</span><span class="vm">__func__</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">attr</span><span class="p">,</span> <span class="p">(</span><span class="nb">property</span><span class="p">,</span> <span class="n">enum_property</span><span class="p">)):</span>
<span class="k">return</span> <span class="n">attr</span><span class="o">.</span><span class="fm">__get__</span><span class="p">(</span><span class="n">instance</span><span class="p">,</span> <span class="n">ownerclass</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">callable</span><span class="p">(</span><span class="n">attr</span><span class="p">):</span>
<span class="k">return</span> <span class="k">lambda</span> <span class="o">*</span><span class="n">arg</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">:</span> <span class="n">attr</span><span class="p">(</span><span class="n">instance</span><span class="p">,</span> <span class="o">*</span><span class="n">arg</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">attr</span>
<span class="k">def</span> <span class="fm">__set__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">instance</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="n">ownerclass</span> <span class="o">=</span> <span class="n">instance</span><span class="o">.</span><span class="vm">__class__</span>
<span class="k">for</span> <span class="n">base</span> <span class="ow">in</span> <span class="n">ownerclass</span><span class="o">.</span><span class="vm">__mro__</span><span class="p">[</span><span class="mi">1</span><span class="p">:]:</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="ow">in</span> <span class="n">base</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">:</span>
<span class="n">attr</span> <span class="o">=</span> <span class="n">base</span><span class="o">.</span><span class="vm">__dict__</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">attr</span><span class="p">,</span> <span class="nb">property</span><span class="p">):</span>
<span class="n">setter</span> <span class="o">=</span> <span class="n">attr</span><span class="o">.</span><span class="fm">__set__</span>
<span class="k">if</span> <span class="n">setter</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">setter</span><span class="p">(</span><span class="n">instance</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s2">"can't set attribute </span><span class="si">%r</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="p">))</span>
<span class="k">def</span> <span class="fm">__delete__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">instance</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s2">"can't delete attribute </span><span class="si">%r</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">,</span> <span class="p">))</span>
<span class="n">_RouteClassAttributeToGetattr</span> <span class="o">=</span> <span class="n">enum_property</span>
<span class="k">class</span> <span class="nc">NonMember</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">"""</span>
<span class="sd"> Protects item from becaming an Enum member during class creation.</span>
<span class="sd"> """</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="n">value</span>
<span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">instance</span><span class="p">,</span> <span class="n">ownerclass</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span>
<span class="n">skip</span> <span class="o">=</span> <span class="n">nonmember</span> <span class="o">=</span> <span class="n">NonMember</span>
<span class="k">class</span> <span class="nc">Member</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">"""</span>
<span class="sd"> Forces item to became an Enum member during class creation.</span>
<span class="sd"> """</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="n">value</span>
<span class="n">member</span> <span class="o">=</span> <span class="n">Member</span>
<span class="k">def</span> <span class="nf">_is_descriptor</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
<span class="sd">"""Returns True if obj is a descriptor, False otherwise."""</span>
<span class="k">return</span> <span class="p">(</span>
<span class="nb">hasattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="s1">'__get__'</span><span class="p">)</span> <span class="ow">or</span>
<span class="nb">hasattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="s1">'__set__'</span><span class="p">)</span> <span class="ow">or</span>
<span class="nb">hasattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="s1">'__delete__'</span><span class="p">))</span>
<span class="k">def</span> <span class="nf">_is_dunder</span><span class="p">(</span><span class="n">name</span><span class="p">):</span>
<span class="sd">"""Returns True if a __dunder__ name, False otherwise."""</span>
<span class="k">return</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="o">></span> <span class="mi">4</span> <span class="ow">and</span>
<span class="n">name</span><span class="p">[:</span><span class="mi">2</span><span class="p">]</span> <span class="o">==</span> <span class="n">name</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">:]</span> <span class="o">==</span> <span class="s1">'__'</span> <span class="ow">and</span>
<span class="n">name</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">'_'</span> <span class="ow">and</span>
<span class="n">name</span><span class="p">[</span><span class="o">-</span><span class="mi">3</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">'_'</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_is_sunder</span><span class="p">(</span><span class="n">name</span><span class="p">):</span>
<span class="sd">"""Returns True if a _sunder_ name, False otherwise."""</span>
<span class="k">return</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">name</span><span class="p">)</span> <span class="o">></span> <span class="mi">2</span> <span class="ow">and</span>
<span class="n">name</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="n">name</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s1">'_'</span> <span class="ow">and</span>
<span class="n">name</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">'_'</span> <span class="ow">and</span>
<span class="n">name</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">'_'</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_is_internal_class</span><span class="p">(</span><span class="n">cls_name</span><span class="p">,</span> <span class="n">obj</span><span class="p">):</span>
<span class="c1"># only 3.3 and up, always return False in 3.2 and below</span>
<span class="k">if</span> <span class="n">pyver</span> <span class="o"><</span> <span class="mf">3.3</span><span class="p">:</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">qualname</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="s1">'__qualname__'</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="k">return</span> <span class="ow">not</span> <span class="n">_is_descriptor</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span> <span class="ow">and</span> <span class="n">qualname</span> <span class="ow">and</span> <span class="n">re</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="sa">r</span><span class="s2">"\.?</span><span class="si">%s</span><span class="s2">\.\w+$"</span> <span class="o">%</span> <span class="n">cls_name</span><span class="p">,</span> <span class="n">qualname</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_make_class_unpicklable</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="sd">"""Make the given class un-picklable."""</span>
<span class="k">def</span> <span class="nf">_break_on_call_reduce</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">protocol</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%r</span><span class="s1"> cannot be pickled'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="p">))</span>
<span class="bp">cls</span><span class="o">.</span><span class="n">__reduce_ex__</span> <span class="o">=</span> <span class="n">_break_on_call_reduce</span>
<span class="bp">cls</span><span class="o">.</span><span class="vm">__module__</span> <span class="o">=</span> <span class="s1">'<unknown>'</span>
<span class="k">def</span> <span class="nf">_check_auto_args</span><span class="p">(</span><span class="n">method</span><span class="p">):</span>
<span class="sd">"""check if new generate method supports *args and **kwds"""</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">method</span><span class="p">,</span> <span class="nb">staticmethod</span><span class="p">):</span>
<span class="n">method</span> <span class="o">=</span> <span class="n">method</span><span class="o">.</span><span class="fm">__get__</span><span class="p">(</span><span class="nb">type</span><span class="p">)</span>
<span class="n">method</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">method</span><span class="p">,</span> <span class="s1">'im_func'</span><span class="p">,</span> <span class="n">method</span><span class="p">)</span>
<span class="n">args</span><span class="p">,</span> <span class="n">varargs</span><span class="p">,</span> <span class="n">keywords</span><span class="p">,</span> <span class="n">defaults</span> <span class="o">=</span> <span class="n">getargspec</span><span class="p">(</span><span class="n">method</span><span class="p">)</span>
<span class="k">return</span> <span class="n">varargs</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">keywords</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
<span class="k">def</span> <span class="nf">_get_attr_from_chain</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">attr</span><span class="p">):</span>
<span class="n">sentinel</span> <span class="o">=</span> <span class="nb">object</span><span class="p">()</span>
<span class="k">for</span> <span class="n">basecls</span> <span class="ow">in</span> <span class="bp">cls</span><span class="o">.</span><span class="n">mro</span><span class="p">():</span>
<span class="n">obj</span> <span class="o">=</span> <span class="n">basecls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">attr</span><span class="p">,</span> <span class="n">sentinel</span><span class="p">)</span>
<span class="k">if</span> <span class="n">obj</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">sentinel</span><span class="p">:</span>
<span class="k">return</span> <span class="n">obj</span>
<span class="k">def</span> <span class="nf">_value</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="p">(</span><span class="n">auto</span><span class="p">,</span> <span class="n">constant</span><span class="p">)):</span>
<span class="k">return</span> <span class="n">obj</span><span class="o">.</span><span class="n">value</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">obj</span>
<span class="c1">################</span>
<span class="c1"># Constant stuff</span>
<span class="c1">################</span>
<span class="c1"># metaclass and class dict for NamedConstant</span>
<span class="k">class</span> <span class="nc">constant</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">'''</span>
<span class="sd"> Simple constant descriptor for NamedConstant and Enum use.</span>
<span class="sd"> '''</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="n">doc</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">value</span> <span class="o">=</span> <span class="n">value</span>
<span class="bp">self</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">=</span> <span class="n">doc</span>
<span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span>
<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="s1">'</span><span class="si">%s</span><span class="s1">(</span><span class="si">%r</span><span class="s1">)'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__and__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_and_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rand__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_and_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__invert__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_inv_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__or__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_or_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__ror__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_or_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__xor__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_xor_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rxor__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_xor_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__abs__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_abs_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__add__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_add_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__radd__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_add_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__neg__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_neg_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__pos__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_pos_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">if</span> <span class="n">pyver</span> <span class="o"><</span> <span class="mi">3</span><span class="p">:</span>
<span class="k">def</span> <span class="nf">__div__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_div_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="nf">__rdiv__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_div_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__floordiv__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_floordiv_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rfloordiv__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_floordiv_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__truediv__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_truediv_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rtruediv__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_truediv_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__lshift__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_lshift_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rlshift__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_lshift_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__rshift__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_rshift_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rrshift__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_rshift_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__mod__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_mod_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rmod__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_mod_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__mul__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_mul_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rmul__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_mul_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__pow__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_pow_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rpow__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_pow_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__sub__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_sub_</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">,</span> <span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">))</span>
<span class="k">def</span> <span class="fm">__rsub__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_sub_</span><span class="p">(</span><span class="n">_value</span><span class="p">(</span><span class="n">other</span><span class="p">),</span> <span class="bp">self</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
<span class="n">NamedConstant</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">class</span> <span class="nc">_NamedConstantDict</span><span class="p">(</span><span class="nb">dict</span><span class="p">):</span>
<span class="sd">"""Track constant order and ensure names are not reused.</span>
<span class="sd"> NamedConstantMeta will use the names found in self._names as the</span>
<span class="sd"> Constant names.</span>
<span class="sd"> """</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">_NamedConstantDict</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_names</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">def</span> <span class="fm">__setitem__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="sd">"""Changes anything not dundered or not a constant descriptor.</span>
<span class="sd"> If an constant name is used twice, an error is raised; duplicate</span>
<span class="sd"> values are not checked for.</span>
<span class="sd"> Single underscore (sunder) names are reserved.</span>
<span class="sd"> """</span>
<span class="k">if</span> <span class="n">_is_sunder</span><span class="p">(</span><span class="n">key</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">'_names_ are reserved for future NamedConstant use'</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">_is_dunder</span><span class="p">(</span><span class="n">key</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">elif</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_names</span><span class="p">:</span>
<span class="c1"># overwriting an existing constant?</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'attempt to reuse name: </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="p">))</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">constant</span><span class="p">)</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">_is_descriptor</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
<span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">:</span>
<span class="c1"># overwriting a descriptor?</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1"> already defined as: </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="p">[</span><span class="n">key</span><span class="p">]))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_names</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
<span class="nb">super</span><span class="p">(</span><span class="n">_NamedConstantDict</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__setitem__</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">NamedConstantMeta</span><span class="p">(</span><span class="nb">type</span><span class="p">):</span>
<span class="sd">"""</span>
<span class="sd"> Block attempts to reassign NamedConstant attributes.</span>
<span class="sd"> """</span>
<span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="n">metacls</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">clsdict</span><span class="p">):</span>
<span class="k">if</span> <span class="nb">type</span><span class="p">(</span><span class="n">clsdict</span><span class="p">)</span> <span class="ow">is</span> <span class="nb">dict</span><span class="p">:</span>
<span class="n">original_dict</span> <span class="o">=</span> <span class="n">clsdict</span>
<span class="n">clsdict</span> <span class="o">=</span> <span class="n">_NamedConstantDict</span><span class="p">()</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">original_dict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">clsdict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">v</span>
<span class="n">newdict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">constants</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">clsdict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">clsdict</span><span class="o">.</span><span class="n">_names</span><span class="p">:</span>
<span class="n">constants</span><span class="p">[</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">obj</span>
<span class="k">continue</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">nonmember</span><span class="p">):</span>
<span class="n">obj</span> <span class="o">=</span> <span class="n">obj</span><span class="o">.</span><span class="n">value</span>
<span class="n">newdict</span><span class="p">[</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">obj</span>
<span class="n">newcls</span> <span class="o">=</span> <span class="nb">super</span><span class="p">(</span><span class="n">NamedConstantMeta</span><span class="p">,</span> <span class="n">metacls</span><span class="p">)</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="n">metacls</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">newdict</span><span class="p">)</span>
<span class="n">newcls</span><span class="o">.</span><span class="n">_named_constant_cache_</span> <span class="o">=</span> <span class="p">{}</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">constants</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">newcls</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="n">newcls</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">obj</span><span class="p">)</span>
<span class="k">return</span> <span class="n">newcls</span>
<span class="k">def</span> <span class="fm">__delattr__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">attr</span><span class="p">):</span>
<span class="n">cur_obj</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">attr</span><span class="p">)</span>
<span class="k">if</span> <span class="n">NamedConstant</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">cur_obj</span><span class="p">,</span> <span class="n">NamedConstant</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s1">'cannot delete constant <</span><span class="si">%s</span><span class="s1">.</span><span class="si">%s</span><span class="s1">>'</span> <span class="o">%</span> <span class="p">(</span><span class="n">cur_obj</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">cur_obj</span><span class="o">.</span><span class="n">_name_</span><span class="p">))</span>
<span class="nb">super</span><span class="p">(</span><span class="n">NamedConstantMeta</span><span class="p">,</span> <span class="bp">cls</span><span class="p">)</span><span class="o">.</span><span class="fm">__delattr__</span><span class="p">(</span><span class="n">attr</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__setattr__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="sd">"""Block attempts to reassign NamedConstants.</span>
<span class="sd"> """</span>
<span class="n">cur_obj</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="k">if</span> <span class="n">NamedConstant</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">cur_obj</span><span class="p">,</span> <span class="n">NamedConstant</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s1">'cannot rebind constant <</span><span class="si">%s</span><span class="s1">.</span><span class="si">%s</span><span class="s1">>'</span> <span class="o">%</span> <span class="p">(</span><span class="n">cur_obj</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">cur_obj</span><span class="o">.</span><span class="n">_name_</span><span class="p">))</span>
<span class="nb">super</span><span class="p">(</span><span class="n">NamedConstantMeta</span><span class="p">,</span> <span class="bp">cls</span><span class="p">)</span><span class="o">.</span><span class="fm">__setattr__</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
<span class="n">temp_constant_dict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">temp_constant_dict</span><span class="p">[</span><span class="s1">'__doc__'</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"NamedConstants protection.</span><span class="se">\n\n</span><span class="s2"> Derive from this class to lock NamedConstants.</span><span class="se">\n\n</span><span class="s2">"</span>
<span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">doc</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># lookup, name is value</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">name</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">obj</span> <span class="ow">in</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="bp">cls</span><span class="p">)</span> <span class="ow">and</span> <span class="n">obj</span><span class="o">.</span><span class="n">_value_</span> <span class="o">==</span> <span class="n">value</span><span class="p">:</span>
<span class="k">return</span> <span class="n">obj</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">'</span><span class="si">%r</span><span class="s1"> does not exist in </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__name__</span><span class="p">))</span>
<span class="n">cur_obj</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">cur_obj</span><span class="p">,</span> <span class="n">NamedConstant</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s1">'cannot rebind constant <</span><span class="si">%s</span><span class="s1">.</span><span class="si">%s</span><span class="s1">>'</span> <span class="o">%</span> <span class="p">(</span><span class="n">cur_obj</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">cur_obj</span><span class="o">.</span><span class="n">_name_</span><span class="p">))</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">constant</span><span class="p">):</span>
<span class="n">doc</span> <span class="o">=</span> <span class="n">doc</span> <span class="ow">or</span> <span class="n">value</span><span class="o">.</span><span class="vm">__doc__</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">value</span><span class="o">.</span><span class="n">value</span>
<span class="n">metacls</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__class__</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">NamedConstant</span><span class="p">):</span>
<span class="c1"># constants from other classes are reduced to their actual value</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">value</span><span class="o">.</span><span class="n">_value_</span>
<span class="n">actual_type</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
<span class="n">value_type</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="n">_named_constant_cache_</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">actual_type</span><span class="p">)</span>
<span class="k">if</span> <span class="n">value_type</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">value_type</span> <span class="o">=</span> <span class="nb">type</span><span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="n">value</span><span class="p">)),</span> <span class="p">{})</span>
<span class="bp">cls</span><span class="o">.</span><span class="n">_named_constant_cache_</span><span class="p">[</span><span class="nb">type</span><span class="p">(</span><span class="n">value</span><span class="p">)]</span> <span class="o">=</span> <span class="n">value_type</span>
<span class="n">obj</span> <span class="o">=</span> <span class="n">actual_type</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="n">value_type</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
<span class="n">obj</span><span class="o">.</span><span class="n">_name_</span> <span class="o">=</span> <span class="n">name</span>
<span class="n">obj</span><span class="o">.</span><span class="n">_value_</span> <span class="o">=</span> <span class="n">value</span>
<span class="n">obj</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">=</span> <span class="n">doc</span>
<span class="n">metacls</span><span class="o">.</span><span class="fm">__setattr__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">obj</span><span class="p">)</span>
<span class="k">return</span> <span class="n">obj</span>
<span class="n">temp_constant_dict</span><span class="p">[</span><span class="s1">'__new__'</span><span class="p">]</span> <span class="o">=</span> <span class="fm">__new__</span>
<span class="k">del</span> <span class="fm">__new__</span>
<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="s2">"<</span><span class="si">%s</span><span class="s2">.</span><span class="si">%s</span><span class="s2">: </span><span class="si">%r</span><span class="s2">>"</span> <span class="o">%</span> <span class="p">(</span>
<span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name_</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_value_</span><span class="p">)</span>
<span class="n">temp_constant_dict</span><span class="p">[</span><span class="s1">'__repr__'</span><span class="p">]</span> <span class="o">=</span> <span class="fm">__repr__</span>
<span class="k">del</span> <span class="fm">__repr__</span>
<span class="k">def</span> <span class="nf">__reduce_ex__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">proto</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">getattr</span><span class="p">,</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name_</span><span class="p">)</span>
<span class="n">temp_constant_dict</span><span class="p">[</span><span class="s1">'__reduce_ex__'</span><span class="p">]</span> <span class="o">=</span> <span class="n">__reduce_ex__</span>
<span class="k">del</span> <span class="n">__reduce_ex__</span>
<span class="n">NamedConstant</span> <span class="o">=</span> <span class="n">NamedConstantMeta</span><span class="p">(</span><span class="s1">'NamedConstant'</span><span class="p">,</span> <span class="p">(</span><span class="nb">object</span><span class="p">,</span> <span class="p">),</span> <span class="n">temp_constant_dict</span><span class="p">)</span>
<span class="n">Constant</span> <span class="o">=</span> <span class="n">NamedConstant</span>
<span class="k">del</span> <span class="n">temp_constant_dict</span>
<span class="c1"># now for a NamedTuple</span>
<span class="k">class</span> <span class="nc">_NamedTupleDict</span><span class="p">(</span><span class="n">OrderedDict</span><span class="p">):</span>
<span class="sd">"""Track field order and ensure field names are not reused.</span>
<span class="sd"> NamedTupleMeta will use the names found in self._field_names to translate</span>
<span class="sd"> to indices.</span>
<span class="sd"> """</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_field_names</span> <span class="o">=</span> <span class="p">[]</span>
<span class="nb">super</span><span class="p">(</span><span class="n">_NamedTupleDict</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__setitem__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="sd">"""Records anything not dundered or not a descriptor.</span>
<span class="sd"> If a field name is used twice, an error is raised.</span>
<span class="sd"> Single underscore (sunder) names are reserved.</span>
<span class="sd"> """</span>
<span class="k">if</span> <span class="n">_is_sunder</span><span class="p">(</span><span class="n">key</span><span class="p">):</span>
<span class="k">if</span> <span class="n">key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">(</span><span class="s1">'_size_'</span><span class="p">,</span> <span class="s1">'_order_'</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">'_names_ are reserved for future NamedTuple use'</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">_is_dunder</span><span class="p">(</span><span class="n">key</span><span class="p">):</span>
<span class="k">if</span> <span class="n">key</span> <span class="o">==</span> <span class="s1">'__order__'</span><span class="p">:</span>
<span class="n">key</span> <span class="o">=</span> <span class="s1">'_order_'</span>
<span class="k">elif</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_field_names</span><span class="p">:</span>
<span class="c1"># overwriting a field?</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'attempt to reuse field name: </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="p">))</span>
<span class="k">elif</span> <span class="ow">not</span> <span class="n">_is_descriptor</span><span class="p">(</span><span class="n">value</span><span class="p">):</span>
<span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">:</span>
<span class="c1"># field overwriting a descriptor?</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1"> already defined as: </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="bp">self</span><span class="p">[</span><span class="n">key</span><span class="p">]))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_field_names</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">key</span><span class="p">)</span>
<span class="nb">super</span><span class="p">(</span><span class="n">_NamedTupleDict</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__setitem__</span><span class="p">(</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">_TupleAttributeAtIndex</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
<span class="bp">self</span><span class="o">.</span><span class="n">index</span> <span class="o">=</span> <span class="n">index</span>
<span class="k">if</span> <span class="n">doc</span> <span class="ow">is</span> <span class="n">undefined</span><span class="p">:</span>
<span class="n">doc</span> <span class="o">=</span> <span class="kc">None</span>
<span class="bp">self</span><span class="o">.</span><span class="vm">__doc__</span> <span class="o">=</span> <span class="n">doc</span>
<span class="bp">self</span><span class="o">.</span><span class="n">default</span> <span class="o">=</span> <span class="n">default</span>
<span class="k">def</span> <span class="fm">__get__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">instance</span><span class="p">,</span> <span class="n">owner</span><span class="p">):</span>
<span class="k">if</span> <span class="n">instance</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">instance</span><span class="p">)</span> <span class="o"><=</span> <span class="bp">self</span><span class="o">.</span><span class="n">index</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">AttributeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1"> instance has no value for </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">instance</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">))</span>
<span class="k">return</span> <span class="n">instance</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">index</span><span class="p">]</span>
<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="s1">'</span><span class="si">%s</span><span class="s1">(</span><span class="si">%d</span><span class="s1">)'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">index</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">undefined</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="s1">'undefined'</span>
<span class="k">def</span> <span class="fm">__bool__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>
<span class="n">__nonzero__</span> <span class="o">=</span> <span class="fm">__bool__</span>
<span class="n">undefined</span> <span class="o">=</span> <span class="n">undefined</span><span class="p">()</span>
<span class="k">class</span> <span class="nc">TupleSize</span><span class="p">(</span><span class="n">NamedConstant</span><span class="p">):</span>
<span class="n">fixed</span> <span class="o">=</span> <span class="n">constant</span><span class="p">(</span><span class="s1">'fixed'</span><span class="p">,</span> <span class="s1">'tuple length is static'</span><span class="p">)</span>
<span class="n">minimum</span> <span class="o">=</span> <span class="n">constant</span><span class="p">(</span><span class="s1">'minimum'</span><span class="p">,</span> <span class="s1">'tuple must be at least x long (x is calculated during creation'</span><span class="p">)</span>
<span class="n">variable</span> <span class="o">=</span> <span class="n">constant</span><span class="p">(</span><span class="s1">'variable'</span><span class="p">,</span> <span class="s1">'tuple length can be anything'</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">NamedTupleMeta</span><span class="p">(</span><span class="nb">type</span><span class="p">):</span>
<span class="sd">"""Metaclass for NamedTuple"""</span>
<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="fm">__prepare__</span><span class="p">(</span><span class="n">metacls</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="n">undefined</span><span class="p">):</span>
<span class="k">return</span> <span class="n">_NamedTupleDict</span><span class="p">()</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span> <span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">NamedTupleMeta</span><span class="p">,</span> <span class="bp">cls</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="n">metacls</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">clsdict</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="n">undefined</span><span class="p">):</span>
<span class="k">if</span> <span class="n">bases</span> <span class="o">==</span> <span class="p">(</span><span class="nb">object</span><span class="p">,</span> <span class="p">):</span>
<span class="n">bases</span> <span class="o">=</span> <span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="nb">object</span><span class="p">)</span>
<span class="k">elif</span> <span class="nb">tuple</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">bases</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">object</span> <span class="ow">in</span> <span class="n">bases</span><span class="p">:</span>
<span class="n">index</span> <span class="o">=</span> <span class="n">bases</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="nb">object</span><span class="p">)</span>
<span class="n">bases</span> <span class="o">=</span> <span class="n">bases</span><span class="p">[:</span><span class="n">index</span><span class="p">]</span> <span class="o">+</span> <span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="p">)</span> <span class="o">+</span> <span class="n">bases</span><span class="p">[</span><span class="n">index</span><span class="p">:]</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">bases</span> <span class="o">=</span> <span class="n">bases</span> <span class="o">+</span> <span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="p">)</span>
<span class="c1"># include any fields from base classes</span>
<span class="n">base_dict</span> <span class="o">=</span> <span class="n">_NamedTupleDict</span><span class="p">()</span>
<span class="n">namedtuple_bases</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">base</span> <span class="ow">in</span> <span class="n">bases</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">base</span><span class="p">,</span> <span class="n">NamedTupleMeta</span><span class="p">):</span>
<span class="n">namedtuple_bases</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">base</span><span class="p">)</span>
<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">if</span> <span class="n">namedtuple_bases</span><span class="p">:</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span> <span class="ow">in</span> <span class="n">metacls</span><span class="o">.</span><span class="n">_convert_fields</span><span class="p">(</span><span class="o">*</span><span class="n">namedtuple_bases</span><span class="p">):</span>
<span class="n">base_dict</span><span class="p">[</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span>
<span class="n">i</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">index</span><span class="p">)</span>
<span class="c1"># construct properly ordered dict with normalized indexes</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">clsdict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">base_dict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">v</span>
<span class="n">original_dict</span> <span class="o">=</span> <span class="n">base_dict</span>
<span class="k">if</span> <span class="n">size</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">undefined</span> <span class="ow">and</span> <span class="s1">'_size_'</span> <span class="ow">in</span> <span class="n">original_dict</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'_size_ cannot be set if "size" is passed in header'</span><span class="p">)</span>
<span class="n">add_order</span> <span class="o">=</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">clsdict</span><span class="p">,</span> <span class="n">_NamedTupleDict</span><span class="p">)</span>
<span class="n">clsdict</span> <span class="o">=</span> <span class="n">_NamedTupleDict</span><span class="p">()</span>
<span class="n">clsdict</span><span class="o">.</span><span class="n">setdefault</span><span class="p">(</span><span class="s1">'_size_'</span><span class="p">,</span> <span class="n">size</span> <span class="ow">or</span> <span class="n">TupleSize</span><span class="o">.</span><span class="n">fixed</span><span class="p">)</span>
<span class="n">unnumbered</span> <span class="o">=</span> <span class="n">OrderedDict</span><span class="p">()</span>
<span class="n">numbered</span> <span class="o">=</span> <span class="n">OrderedDict</span><span class="p">()</span>
<span class="n">_order_</span> <span class="o">=</span> <span class="n">original_dict</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">'_order_'</span><span class="p">,</span> <span class="p">[])</span>
<span class="k">if</span> <span class="n">_order_</span> <span class="p">:</span>
<span class="n">_order_</span> <span class="o">=</span> <span class="n">_order_</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">','</span><span class="p">,</span><span class="s1">' '</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
<span class="n">add_order</span> <span class="o">=</span> <span class="kc">False</span>
<span class="c1"># and process this class</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">original_dict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="n">k</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">original_dict</span><span class="o">.</span><span class="n">_field_names</span><span class="p">:</span>
<span class="n">clsdict</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">v</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># TODO:normalize v here</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">baseinteger</span><span class="p">):</span>
<span class="c1"># assume an offset</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">v</span><span class="p">,</span> <span class="n">undefined</span><span class="p">,</span> <span class="n">undefined</span>
<span class="n">i</span> <span class="o">=</span> <span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">target</span> <span class="o">=</span> <span class="n">numbered</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">basestring</span><span class="p">):</span>
<span class="c1"># assume a docstring</span>
<span class="k">if</span> <span class="n">add_order</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">i</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">undefined</span>
<span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="n">target</span> <span class="o">=</span> <span class="n">numbered</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">undefined</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">undefined</span>
<span class="n">target</span> <span class="o">=</span> <span class="n">unnumbered</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="ow">in</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">baseinteger</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="p">(</span><span class="n">basestring</span><span class="p">,</span> <span class="n">NoneType</span><span class="p">)):</span>
<span class="c1"># assume an offset, a docstring, and (maybe) a default</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">v</span> <span class="o">+</span> <span class="p">(</span><span class="n">undefined</span><span class="p">,</span> <span class="p">)</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">v</span>
<span class="n">i</span> <span class="o">=</span> <span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">target</span> <span class="o">=</span> <span class="n">numbered</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="ow">in</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">v</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="p">(</span><span class="n">basestring</span><span class="p">,</span> <span class="n">NoneType</span><span class="p">)):</span>
<span class="c1"># assume a docstring, and (maybe) a default</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">v</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="n">v</span> <span class="o">+</span> <span class="p">(</span><span class="n">undefined</span><span class="p">,</span> <span class="p">)</span>
<span class="k">if</span> <span class="n">add_order</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="p">)</span> <span class="o">+</span> <span class="n">v</span>
<span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="n">target</span> <span class="o">=</span> <span class="n">numbered</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">v</span> <span class="o">=</span> <span class="p">(</span><span class="n">undefined</span><span class="p">,</span> <span class="p">)</span> <span class="o">+</span> <span class="n">v</span>
<span class="n">target</span> <span class="o">=</span> <span class="n">unnumbered</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># refuse to guess further</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">'not sure what to do with </span><span class="si">%s</span><span class="s1">=</span><span class="si">%r</span><span class="s1"> (should be OFFSET [, DOC [, DEFAULT]])'</span> <span class="o">%</span> <span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="n">v</span><span class="p">))</span>
<span class="n">target</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">v</span>
<span class="c1"># all index values have been normalized</span>
<span class="c1"># deal with _order_ (or lack thereof)</span>
<span class="n">fields</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">aliases</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">seen</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
<span class="n">max_len</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">_order_</span><span class="p">:</span>
<span class="k">if</span> <span class="n">unnumbered</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"_order_ not specified and OFFSETs not declared for </span><span class="si">%r</span><span class="s2">"</span> <span class="o">%</span> <span class="p">(</span><span class="n">unnumbered</span><span class="o">.</span><span class="n">keys</span><span class="p">(),</span> <span class="p">))</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="p">(</span><span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">numbered</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">nv</span><span class="p">:</span> <span class="p">(</span><span class="n">nv</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">nv</span><span class="p">[</span><span class="mi">0</span><span class="p">])):</span>
<span class="k">if</span> <span class="n">index</span> <span class="ow">in</span> <span class="n">seen</span><span class="p">:</span>
<span class="n">aliases</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">fields</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="n">seen</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">index</span><span class="p">)</span>
<span class="n">max_len</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">max_len</span><span class="p">,</span> <span class="n">index</span> <span class="o">+</span> <span class="mi">1</span><span class="p">)</span>
<span class="n">offsets</span> <span class="o">=</span> <span class="n">numbered</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># check if any unnumbered not in _order_</span>
<span class="n">missing</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">unnumbered</span><span class="p">)</span> <span class="o">-</span> <span class="nb">set</span><span class="p">(</span><span class="n">_order_</span><span class="p">)</span>
<span class="k">if</span> <span class="n">missing</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">"unable to order fields: </span><span class="si">%s</span><span class="s2"> (use _order_ or specify OFFSET"</span> <span class="o">%</span> <span class="n">missing</span><span class="p">)</span>
<span class="n">offsets</span> <span class="o">=</span> <span class="n">OrderedDict</span><span class="p">()</span>
<span class="c1"># if any unnumbered, number them from their position in _order_</span>
<span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">_order_</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span> <span class="o">=</span> <span class="n">unnumbered</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="ow">or</span> <span class="n">numbered</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">IndexError</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">'</span><span class="si">%s</span><span class="s1"> (from _order_) not found in </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">k</span><span class="p">,</span> <span class="bp">cls</span><span class="p">))</span>
<span class="k">if</span> <span class="n">index</span> <span class="ow">is</span> <span class="ow">not</span> <span class="n">undefined</span><span class="p">:</span>
<span class="n">i</span> <span class="o">=</span> <span class="n">index</span>
<span class="k">if</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">seen</span><span class="p">:</span>
<span class="n">aliases</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">fields</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
<span class="n">seen</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
<span class="n">offsets</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">i</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span>
<span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="n">max_len</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">max_len</span><span class="p">,</span> <span class="n">i</span><span class="p">)</span>
<span class="c1"># now handle anything in numbered</span>
<span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="p">(</span><span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">numbered</span><span class="o">.</span><span class="n">items</span><span class="p">(),</span> <span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">nv</span><span class="p">:</span> <span class="p">(</span><span class="n">nv</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">],</span> <span class="n">nv</span><span class="p">[</span><span class="mi">0</span><span class="p">])):</span>
<span class="k">if</span> <span class="n">index</span> <span class="ow">in</span> <span class="n">seen</span><span class="p">:</span>
<span class="n">aliases</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">fields</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="p">)</span>
<span class="n">seen</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">index</span><span class="p">)</span>
<span class="n">offsets</span><span class="p">[</span><span class="n">k</span><span class="p">]</span> <span class="o">=</span> <span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span>
<span class="n">max_len</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="n">max_len</span><span class="p">,</span> <span class="n">index</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
<span class="c1"># at this point fields and aliases should be ordered lists, offsets should be an</span>
<span class="c1"># OrdededDict with each value an int, str or None or undefined, default or None or undefined</span>
<span class="k">assert</span> <span class="nb">len</span><span class="p">(</span><span class="n">fields</span><span class="p">)</span> <span class="o">+</span> <span class="nb">len</span><span class="p">(</span><span class="n">aliases</span><span class="p">)</span> <span class="o">==</span> <span class="nb">len</span><span class="p">(</span><span class="n">offsets</span><span class="p">),</span> <span class="s2">"number of fields + aliases != number of offsets"</span>
<span class="k">assert</span> <span class="nb">set</span><span class="p">(</span><span class="n">fields</span><span class="p">)</span> <span class="o">&</span> <span class="nb">set</span><span class="p">(</span><span class="n">offsets</span><span class="p">)</span> <span class="o">==</span> <span class="nb">set</span><span class="p">(</span><span class="n">fields</span><span class="p">),</span> <span class="s2">"some fields are not in offsets: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="nb">set</span><span class="p">(</span><span class="n">fields</span><span class="p">)</span> <span class="o">&</span> <span class="nb">set</span><span class="p">(</span><span class="n">offsets</span><span class="p">)</span>
<span class="k">assert</span> <span class="nb">set</span><span class="p">(</span><span class="n">aliases</span><span class="p">)</span> <span class="o">&</span> <span class="nb">set</span><span class="p">(</span><span class="n">offsets</span><span class="p">)</span> <span class="o">==</span> <span class="nb">set</span><span class="p">(</span><span class="n">aliases</span><span class="p">),</span> <span class="s2">"some aliases are not in offsets: </span><span class="si">%s</span><span class="s2">"</span> <span class="o">%</span> <span class="nb">set</span><span class="p">(</span><span class="n">aliases</span><span class="p">)</span> <span class="o">&</span> <span class="nb">set</span><span class="p">(</span><span class="n">offsets</span><span class="p">)</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="p">(</span><span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span> <span class="ow">in</span> <span class="n">offsets</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">index</span><span class="p">,</span> <span class="n">baseinteger</span><span class="p">),</span> <span class="s2">"index for </span><span class="si">%s</span><span class="s2"> is not an int (</span><span class="si">%s</span><span class="s2">:</span><span class="si">%r</span><span class="s2">)"</span> <span class="o">%</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="n">index</span><span class="p">),</span> <span class="n">index</span><span class="p">)</span>
<span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">doc</span><span class="p">,</span> <span class="p">(</span><span class="n">basestring</span><span class="p">,</span> <span class="n">NoneType</span><span class="p">))</span> <span class="ow">or</span> <span class="n">doc</span> <span class="ow">is</span> <span class="n">undefined</span><span class="p">,</span> <span class="s2">"doc is not a str, None, nor undefined (</span><span class="si">%s</span><span class="s2">:</span><span class="si">%r</span><span class="s2">)"</span> <span class="o">%</span> <span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="nb">type</span><span class="p">(</span><span class="n">doc</span><span class="p">),</span> <span class="n">doc</span><span class="p">)</span>
<span class="c1"># create descriptors for fields</span>
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="p">(</span><span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span> <span class="ow">in</span> <span class="n">offsets</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">clsdict</span><span class="p">[</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">_TupleAttributeAtIndex</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">index</span><span class="p">,</span> <span class="n">doc</span><span class="p">,</span> <span class="n">default</span><span class="p">)</span>
<span class="n">clsdict</span><span class="p">[</span><span class="s1">'__slots__'</span><span class="p">]</span> <span class="o">=</span> <span class="p">()</span>
<span class="c1"># create our new NamedTuple type</span>
<span class="n">namedtuple_class</span> <span class="o">=</span> <span class="nb">super</span><span class="p">(</span><span class="n">NamedTupleMeta</span><span class="p">,</span> <span class="n">metacls</span><span class="p">)</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="n">metacls</span><span class="p">,</span> <span class="bp">cls</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">clsdict</span><span class="p">)</span>
<span class="n">namedtuple_class</span><span class="o">.</span><span class="n">_fields_</span> <span class="o">=</span> <span class="n">fields</span>
<span class="n">namedtuple_class</span><span class="o">.</span><span class="n">_aliases_</span> <span class="o">=</span> <span class="n">aliases</span>
<span class="n">namedtuple_class</span><span class="o">.</span><span class="n">_defined_len_</span> <span class="o">=</span> <span class="n">max_len</span>
<span class="k">return</span> <span class="n">namedtuple_class</span>
<span class="nd">@staticmethod</span>
<span class="k">def</span> <span class="nf">_convert_fields</span><span class="p">(</span><span class="o">*</span><span class="n">namedtuples</span><span class="p">):</span>
<span class="s2">"create list of index, doc, default triplets for cls in namedtuples"</span>
<span class="n">all_fields</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="bp">cls</span> <span class="ow">in</span> <span class="n">namedtuples</span><span class="p">:</span>
<span class="n">base</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">all_fields</span><span class="p">)</span>
<span class="k">for</span> <span class="n">field</span> <span class="ow">in</span> <span class="bp">cls</span><span class="o">.</span><span class="n">_fields_</span><span class="p">:</span>
<span class="n">desc</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">field</span><span class="p">)</span>
<span class="n">all_fields</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">field</span><span class="p">,</span> <span class="n">base</span><span class="o">+</span><span class="n">desc</span><span class="o">.</span><span class="n">index</span><span class="p">,</span> <span class="n">desc</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">,</span> <span class="n">desc</span><span class="o">.</span><span class="n">default</span><span class="p">))</span>
<span class="k">return</span> <span class="n">all_fields</span>
<span class="k">def</span> <span class="fm">__add__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
<span class="s2">"A new NamedTuple is created by concatenating the _fields_ and adjusting the descriptors"</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">other</span><span class="p">,</span> <span class="n">NamedTupleMeta</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">NotImplemented</span>
<span class="k">return</span> <span class="n">NamedTupleMeta</span><span class="p">(</span><span class="s1">'</span><span class="si">%s%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="n">other</span><span class="o">.</span><span class="vm">__name__</span><span class="p">),</span> <span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">other</span><span class="p">),</span> <span class="p">{})</span>
<span class="k">def</span> <span class="fm">__call__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">):</span>
<span class="sd">"""Creates a new NamedTuple class or an instance of a NamedTuple subclass.</span>
<span class="sd"> NamedTuple should have args of (class_name, names, module)</span>
<span class="sd"> `names` can be:</span>
<span class="sd"> * A string containing member names, separated either with spaces or</span>
<span class="sd"> commas. Values are auto-numbered from 1.</span>
<span class="sd"> * An iterable of member names. Values are auto-numbered from 1.</span>
<span class="sd"> * An iterable of (member name, value) pairs.</span>
<span class="sd"> * A mapping of member name -> value.</span>
<span class="sd"> `module`, if set, will be stored in the new class' __module__ attribute;</span>
<span class="sd"> Note: if `module` is not set this routine will attempt to discover the</span>
<span class="sd"> calling module by walking the frame stack; if this is unsuccessful</span>
<span class="sd"> the resulting class will not be pickleable.</span>
<span class="sd"> subclass should have whatever arguments and/or keywords will be used to create an</span>
<span class="sd"> instance of the subclass</span>
<span class="sd"> """</span>
<span class="k">if</span> <span class="bp">cls</span> <span class="ow">is</span> <span class="n">NamedTuple</span><span class="p">:</span>
<span class="n">original_args</span> <span class="o">=</span> <span class="n">args</span>
<span class="n">original_kwds</span> <span class="o">=</span> <span class="n">kwds</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
<span class="c1"># create a new subclass</span>
<span class="k">try</span><span class="p">:</span>
<span class="k">if</span> <span class="s1">'class_name'</span> <span class="ow">in</span> <span class="n">kwds</span><span class="p">:</span>
<span class="n">class_name</span> <span class="o">=</span> <span class="n">kwds</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">'class_name'</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">class_name</span><span class="p">,</span> <span class="n">args</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="k">if</span> <span class="s1">'names'</span> <span class="ow">in</span> <span class="n">kwds</span><span class="p">:</span>
<span class="n">names</span> <span class="o">=</span> <span class="n">kwds</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">'names'</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">names</span><span class="p">,</span> <span class="n">args</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="k">if</span> <span class="s1">'module'</span> <span class="ow">in</span> <span class="n">kwds</span><span class="p">:</span>
<span class="n">module</span> <span class="o">=</span> <span class="n">kwds</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">'module'</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">args</span><span class="p">:</span>
<span class="n">module</span><span class="p">,</span> <span class="n">args</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">module</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">if</span> <span class="s1">'type'</span> <span class="ow">in</span> <span class="n">kwds</span><span class="p">:</span>
<span class="nb">type</span> <span class="o">=</span> <span class="n">kwds</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">'type'</span><span class="p">)</span>
<span class="k">elif</span> <span class="n">args</span><span class="p">:</span>
<span class="nb">type</span><span class="p">,</span> <span class="n">args</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="k">else</span><span class="p">:</span>
<span class="nb">type</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">except</span> <span class="ne">IndexError</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'too few arguments to NamedTuple: </span><span class="si">%s</span><span class="s1">, </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">original_args</span><span class="p">,</span> <span class="n">original_kwds</span><span class="p">))</span>
<span class="k">if</span> <span class="n">args</span> <span class="ow">or</span> <span class="n">kwds</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'too many arguments to NamedTuple: </span><span class="si">%s</span><span class="s1">, </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">original_args</span><span class="p">,</span> <span class="n">original_kwds</span><span class="p">))</span>
<span class="k">if</span> <span class="n">pyver</span> <span class="o"><</span> <span class="mf">3.0</span><span class="p">:</span>
<span class="c1"># if class_name is unicode, attempt a conversion to ASCII</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">class_name</span><span class="p">,</span> <span class="n">unicode</span><span class="p">):</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">class_name</span> <span class="o">=</span> <span class="n">class_name</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s1">'ascii'</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">UnicodeEncodeError</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%r</span><span class="s1"> is not representable in ASCII'</span> <span class="o">%</span> <span class="p">(</span><span class="n">class_name</span><span class="p">,</span> <span class="p">))</span>
<span class="c1"># quick exit if names is a NamedTuple</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">names</span><span class="p">,</span> <span class="n">NamedTupleMeta</span><span class="p">):</span>
<span class="n">names</span><span class="o">.</span><span class="vm">__name__</span> <span class="o">=</span> <span class="n">class_name</span>
<span class="k">if</span> <span class="nb">type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="nb">type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">names</span><span class="o">.</span><span class="vm">__bases__</span><span class="p">:</span>
<span class="n">names</span><span class="o">.</span><span class="vm">__bases__</span> <span class="o">=</span> <span class="p">(</span><span class="nb">type</span><span class="p">,</span> <span class="p">)</span> <span class="o">+</span> <span class="n">names</span><span class="o">.</span><span class="vm">__bases__</span>
<span class="k">return</span> <span class="n">names</span>
<span class="n">metacls</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__class__</span>
<span class="n">bases</span> <span class="o">=</span> <span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="p">)</span>
<span class="n">clsdict</span> <span class="o">=</span> <span class="n">metacls</span><span class="o">.</span><span class="fm">__prepare__</span><span class="p">(</span><span class="n">class_name</span><span class="p">,</span> <span class="n">bases</span><span class="p">)</span>
<span class="c1"># special processing needed for names?</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">names</span><span class="p">,</span> <span class="n">basestring</span><span class="p">):</span>
<span class="n">names</span> <span class="o">=</span> <span class="n">names</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">','</span><span class="p">,</span> <span class="s1">' '</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">names</span><span class="p">,</span> <span class="p">(</span><span class="nb">tuple</span><span class="p">,</span> <span class="nb">list</span><span class="p">))</span> <span class="ow">and</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">names</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">basestring</span><span class="p">):</span>
<span class="n">names</span> <span class="o">=</span> <span class="p">[(</span><span class="n">e</span><span class="p">,</span> <span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">names</span><span class="p">)]</span>
<span class="c1"># Here, names is either an iterable of (name, index) or (name, index, doc, default) or a mapping.</span>
<span class="n">item</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># in case names is empty</span>
<span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">names</span><span class="p">:</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="n">basestring</span><span class="p">):</span>
<span class="c1"># mapping</span>
<span class="n">field_name</span><span class="p">,</span> <span class="n">field_index</span> <span class="o">=</span> <span class="n">item</span><span class="p">,</span> <span class="n">names</span><span class="p">[</span><span class="n">item</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># non-mapping</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">item</span><span class="p">)</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span>
<span class="n">field_name</span><span class="p">,</span> <span class="n">field_index</span> <span class="o">=</span> <span class="n">item</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">field_name</span><span class="p">,</span> <span class="n">field_index</span> <span class="o">=</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">:]</span>
<span class="n">clsdict</span><span class="p">[</span><span class="n">field_name</span><span class="p">]</span> <span class="o">=</span> <span class="n">field_index</span>
<span class="k">if</span> <span class="nb">type</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="nb">type</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">):</span>
<span class="nb">type</span> <span class="o">=</span> <span class="p">(</span><span class="nb">type</span><span class="p">,</span> <span class="p">)</span>
<span class="n">bases</span> <span class="o">=</span> <span class="nb">type</span> <span class="o">+</span> <span class="n">bases</span>
<span class="n">namedtuple_class</span> <span class="o">=</span> <span class="n">metacls</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="n">metacls</span><span class="p">,</span> <span class="n">class_name</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">clsdict</span><span class="p">)</span>
<span class="c1"># TODO: replace the frame hack if a blessed way to know the calling</span>
<span class="c1"># module is ever developed</span>
<span class="k">if</span> <span class="n">module</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">module</span> <span class="o">=</span> <span class="n">_sys</span><span class="o">.</span><span class="n">_getframe</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">f_globals</span><span class="p">[</span><span class="s1">'__name__'</span><span class="p">]</span>
<span class="k">except</span> <span class="p">(</span><span class="ne">AttributeError</span><span class="p">,</span> <span class="ne">ValueError</span><span class="p">,</span> <span class="ne">KeyError</span><span class="p">):</span>
<span class="k">pass</span>
<span class="k">if</span> <span class="n">module</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">_make_class_unpicklable</span><span class="p">(</span><span class="n">namedtuple_class</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">namedtuple_class</span><span class="o">.</span><span class="vm">__module__</span> <span class="o">=</span> <span class="n">module</span>
<span class="k">return</span> <span class="n">namedtuple_class</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># instantiate a subclass</span>
<span class="n">namedtuple_instance</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">namedtuple_instance</span><span class="p">,</span> <span class="bp">cls</span><span class="p">):</span>
<span class="n">namedtuple_instance</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">)</span>
<span class="k">return</span> <span class="n">namedtuple_instance</span>
<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">__fields__</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">list</span><span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="n">_fields_</span><span class="p">)</span>
<span class="c1"># collections.namedtuple compatibility</span>
<span class="n">_fields</span> <span class="o">=</span> <span class="n">__fields__</span>
<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">__aliases__</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="k">return</span> <span class="nb">list</span><span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="n">_aliases_</span><span class="p">)</span>
<span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">cls</span><span class="p">):</span>
<span class="k">return</span> <span class="s2">"<NamedTuple </span><span class="si">%r</span><span class="s2">>"</span> <span class="o">%</span> <span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="vm">__name__</span><span class="p">,</span> <span class="p">)</span>
<span class="n">temp_namedtuple_dict</span> <span class="o">=</span> <span class="p">{}</span>
<span class="n">temp_namedtuple_dict</span><span class="p">[</span><span class="s1">'__doc__'</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"NamedTuple base class.</span><span class="se">\n\n</span><span class="s2"> Derive from this class to define new NamedTuples.</span><span class="se">\n\n</span><span class="s2">"</span>
<span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwds</span><span class="p">):</span>
<span class="k">if</span> <span class="bp">cls</span><span class="o">.</span><span class="n">_size_</span> <span class="ow">is</span> <span class="n">TupleSize</span><span class="o">.</span><span class="n">fixed</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">></span> <span class="bp">cls</span><span class="o">.</span><span class="n">_defined_len_</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'</span><span class="si">%d</span><span class="s1"> fields expected, </span><span class="si">%d</span><span class="s1"> received'</span> <span class="o">%</span> <span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="n">_defined_len_</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)))</span>
<span class="n">unknown</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">kwds</span><span class="p">)</span> <span class="o">-</span> <span class="nb">set</span><span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="n">_fields_</span><span class="p">)</span> <span class="o">-</span> <span class="nb">set</span><span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="n">_aliases_</span><span class="p">)</span>
<span class="k">if</span> <span class="n">unknown</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'unknown fields: </span><span class="si">%r</span><span class="s1">'</span> <span class="o">%</span> <span class="p">(</span><span class="n">unknown</span><span class="p">,</span> <span class="p">))</span>
<span class="n">final_args</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">+</span> <span class="p">[</span><span class="n">undefined</span><span class="p">]</span> <span class="o">*</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">cls</span><span class="o">.</span><span class="n">__fields__</span><span class="p">)</span> <span class="o">-</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">))</span>
<span class="k">for</span> <span class="n">field</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">kwds</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">index</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">field</span><span class="p">)</span><span class="o">.</span><span class="n">index</span>
<span class="k">if</span> <span class="n">final_args</span><span class="p">[</span><span class="n">index</span><span class="p">]</span> <span class="o">!=</span> <span class="n">undefined</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'field </span><span class="si">%s</span><span class="s1"> specified more than once'</span> <span class="o">%</span> <span class="n">field</span><span class="p">)</span>
<span class="n">final_args</span><span class="p">[</span><span class="n">index</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
<span class="n">missing</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">index</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">final_args</span><span class="p">):</span>
<span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="n">undefined</span><span class="p">:</span>
<span class="c1"># look for default values</span>
<span class="n">name</span> <span class="o">=</span> <span class="bp">cls</span><span class="o">.</span><span class="n">__fields__</span><span class="p">[</span><span class="n">index</span><span class="p">]</span>
<span class="n">default</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span><span class="o">.</span><span class="n">default</span>
<span class="k">if</span> <span class="n">default</span> <span class="ow">is</span> <span class="n">undefined</span><span class="p">:</span>
<span class="n">missing</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">final_args</span><span class="p">[</span><span class="n">index</span><span class="p">]</span> <span class="o">=</span> <span class="n">default</span>
<span class="k">if</span> <span class="n">missing</span><span class="p">:</span>
<span class="k">if</span> <span class="bp">cls</span><span class="o">.</span><span class="n">_size_</span> <span class="ow">in</span> <span class="p">(</span><span class="n">TupleSize</span><span class="o">.</span><span class="n">fixed</span><span class="p">,</span> <span class="n">TupleSize</span><span class="o">.</span><span class="n">minimum</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'values not provided for field(s): </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="s1">', '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">missing</span><span class="p">))</span>
<span class="k">while</span> <span class="n">fina
gitextract_7xksykym/ ├── .gitattributes ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ └── workflows/ │ └── python-publish.yml ├── .gitignore ├── .gitlab-ci.yml ├── .gs-project.yml ├── .pre-commit-config.yaml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MANIFEST.in ├── NOTICE ├── NOTICE.txt ├── README.md ├── SKILL.md ├── conftest.py ├── dco/ │ ├── Bryan Galindo.dco │ ├── Grant McGovern.dco │ ├── Maverick Lin.dco │ └── Scott Weinstein.dco ├── docs/ │ ├── Makefile │ ├── README.md │ ├── _build/ │ │ ├── doctrees/ │ │ │ ├── classes/ │ │ │ │ ├── gs_quant.base.Priceable.doctree │ │ │ │ ├── gs_quant.data.DataContext.doctree │ │ │ │ ├── gs_quant.data.Dataset.doctree │ │ │ │ ├── gs_quant.data.Fields.doctree │ │ │ │ ├── gs_quant.instrument.CommodOTCSwap.doctree │ │ │ │ ├── gs_quant.instrument.CommodSwap.doctree │ │ │ │ ├── gs_quant.instrument.EqCliquet.doctree │ │ │ │ ├── gs_quant.instrument.EqForward.doctree │ │ │ │ ├── gs_quant.instrument.EqOption.doctree │ │ │ │ ├── gs_quant.instrument.EqSynthetic.doctree │ │ │ │ ├── gs_quant.instrument.EqVarianceSwap.doctree │ │ │ │ ├── gs_quant.instrument.FXBinary.doctree │ │ │ │ ├── gs_quant.instrument.FXForward.doctree │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinary.doctree │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.doctree │ │ │ │ ├── gs_quant.instrument.FXOption.doctree │ │ │ │ ├── gs_quant.instrument.FXVolatilitySwap.doctree │ │ │ │ ├── gs_quant.instrument.Forward.doctree │ │ │ │ ├── gs_quant.instrument.IRBasisSwap.doctree │ │ │ │ ├── gs_quant.instrument.IRCMSOption.doctree │ │ │ │ ├── gs_quant.instrument.IRCMSOptionStrip.doctree │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOption.doctree │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.doctree │ │ │ │ ├── gs_quant.instrument.IRCap.doctree │ │ │ │ ├── gs_quant.instrument.IRFloor.doctree │ │ │ │ ├── gs_quant.instrument.IRSwap.doctree │ │ │ │ ├── gs_quant.instrument.IRSwaption.doctree │ │ │ │ ├── gs_quant.instrument.IRXccySwap.doctree │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFix.doctree │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.doctree │ │ │ │ ├── gs_quant.instrument.InflationSwap.doctree │ │ │ │ ├── gs_quant.instrument.Security.doctree │ │ │ │ ├── gs_quant.markets.HistoricalPricingContext.doctree │ │ │ │ ├── gs_quant.markets.PricingContext.doctree │ │ │ │ ├── gs_quant.markets.portfolio.Portfolio.doctree │ │ │ │ ├── gs_quant.markets.securities.Asset.doctree │ │ │ │ ├── gs_quant.markets.securities.AssetClass.doctree │ │ │ │ ├── gs_quant.markets.securities.AssetIdentifier.doctree │ │ │ │ ├── gs_quant.markets.securities.AssetType.doctree │ │ │ │ ├── gs_quant.markets.securities.Index.doctree │ │ │ │ ├── gs_quant.markets.securities.SecurityMaster.doctree │ │ │ │ ├── gs_quant.markets.securities.Stock.doctree │ │ │ │ ├── gs_quant.models.epidemiology.EpidemicModel.doctree │ │ │ │ ├── gs_quant.models.epidemiology.SEIR.doctree │ │ │ │ ├── gs_quant.models.epidemiology.SIR.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.Window.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.LinearRegression.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.SEIRModel.doctree │ │ │ │ └── gs_quant.timeseries.statistics.SIRModel.doctree │ │ │ ├── data.doctree │ │ │ ├── datetime.doctree │ │ │ ├── environment.pickle │ │ │ ├── functions/ │ │ │ │ ├── gs_quant.datetime.date.business_day_count.doctree │ │ │ │ ├── gs_quant.datetime.date.business_day_offset.doctree │ │ │ │ ├── gs_quant.datetime.date.date_range.doctree │ │ │ │ ├── gs_quant.datetime.date.is_business_day.doctree │ │ │ │ ├── gs_quant.datetime.date.prev_business_date.doctree │ │ │ │ ├── gs_quant.datetime.point.point_sort_order.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.abs_.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.add.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.and_.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.ceil.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.divide.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.exp.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.filter_.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.floor.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.floordiv.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.if_.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.log.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.multiply.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.not_.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.or_.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.power.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.repeat.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.smooth_spikes.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.sqrt.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.subtract.doctree │ │ │ │ ├── gs_quant.timeseries.algebra.weighted_sum.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.count.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.diff.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.first.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.lag.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.last.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.last_value.doctree │ │ │ │ ├── gs_quant.timeseries.analysis.weighted_sum.doctree │ │ │ │ ├── gs_quant.timeseries.backtesting.basket.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.align.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.date_range.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.day.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.interpolate.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.month.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.prepend.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.quarter.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.union.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.value.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.weekday.doctree │ │ │ │ ├── gs_quant.timeseries.datetime.year.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.annualize.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.beta.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.change.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.correlation.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.index.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.prices.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.returns.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.doctree │ │ │ │ ├── gs_quant.timeseries.econometrics.volatility.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.cov.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.exponential_std.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.generate_series.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.max_.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.mean.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.median.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.min_.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.mode.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.percentile.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.percentiles.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.product.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.range_.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.std.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.sum_.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.var.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.winsorize.doctree │ │ │ │ ├── gs_quant.timeseries.statistics.zscores.doctree │ │ │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.doctree │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.doctree │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.doctree │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.doctree │ │ │ │ ├── gs_quant.timeseries.technicals.moving_average.doctree │ │ │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.doctree │ │ │ │ └── gs_quant.timeseries.technicals.smoothed_moving_average.doctree │ │ │ ├── index.doctree │ │ │ ├── instrument.doctree │ │ │ ├── market.doctree │ │ │ ├── markets.doctree │ │ │ ├── models.doctree │ │ │ ├── risk.doctree │ │ │ └── timeseries.doctree │ │ ├── html/ │ │ │ ├── .buildinfo │ │ │ ├── _modules/ │ │ │ │ ├── aenum.html │ │ │ │ ├── gs_quant/ │ │ │ │ │ ├── base.html │ │ │ │ │ ├── data/ │ │ │ │ │ │ ├── core.html │ │ │ │ │ │ ├── dataset.html │ │ │ │ │ │ └── fields.html │ │ │ │ │ ├── datetime/ │ │ │ │ │ │ ├── date.html │ │ │ │ │ │ └── point.html │ │ │ │ │ ├── instrument/ │ │ │ │ │ │ └── core.html │ │ │ │ │ ├── markets/ │ │ │ │ │ │ ├── core.html │ │ │ │ │ │ ├── historical.html │ │ │ │ │ │ ├── portfolio.html │ │ │ │ │ │ └── securities.html │ │ │ │ │ ├── models/ │ │ │ │ │ │ └── epidemiology.html │ │ │ │ │ ├── risk/ │ │ │ │ │ │ ├── core.html │ │ │ │ │ │ └── measures.html │ │ │ │ │ ├── target/ │ │ │ │ │ │ ├── common.html │ │ │ │ │ │ └── instrument.html │ │ │ │ │ └── timeseries/ │ │ │ │ │ ├── algebra.html │ │ │ │ │ ├── analysis.html │ │ │ │ │ ├── backtesting.html │ │ │ │ │ ├── datetime.html │ │ │ │ │ ├── econometrics.html │ │ │ │ │ ├── helper.html │ │ │ │ │ ├── statistics.html │ │ │ │ │ └── technicals.html │ │ │ │ └── index.html │ │ │ ├── _sources/ │ │ │ │ ├── classes/ │ │ │ │ │ ├── gs_quant.base.Priceable.rst.txt │ │ │ │ │ ├── gs_quant.data.DataContext.rst.txt │ │ │ │ │ ├── gs_quant.data.Dataset.rst.txt │ │ │ │ │ ├── gs_quant.data.Fields.rst.txt │ │ │ │ │ ├── gs_quant.instrument.CommodOTCSwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.CommodSwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.EqCliquet.rst.txt │ │ │ │ │ ├── gs_quant.instrument.EqForward.rst.txt │ │ │ │ │ ├── gs_quant.instrument.EqOption.rst.txt │ │ │ │ │ ├── gs_quant.instrument.EqSynthetic.rst.txt │ │ │ │ │ ├── gs_quant.instrument.EqVarianceSwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.FXBinary.rst.txt │ │ │ │ │ ├── gs_quant.instrument.FXForward.rst.txt │ │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinary.rst.txt │ │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.rst.txt │ │ │ │ │ ├── gs_quant.instrument.FXOption.rst.txt │ │ │ │ │ ├── gs_quant.instrument.FXVolatilitySwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.Forward.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRBasisSwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRCMSOption.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRCMSOptionStrip.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOption.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRCap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRFloor.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRSwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRSwaption.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRXccySwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFix.rst.txt │ │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.rst.txt │ │ │ │ │ ├── gs_quant.instrument.InflationSwap.rst.txt │ │ │ │ │ ├── gs_quant.instrument.Security.rst.txt │ │ │ │ │ ├── gs_quant.markets.HistoricalPricingContext.rst.txt │ │ │ │ │ ├── gs_quant.markets.PricingContext.rst.txt │ │ │ │ │ ├── gs_quant.markets.portfolio.Portfolio.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.Asset.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.AssetClass.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.AssetIdentifier.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.AssetType.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.Index.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.SecurityMaster.rst.txt │ │ │ │ │ ├── gs_quant.markets.securities.Stock.rst.txt │ │ │ │ │ ├── gs_quant.models.epidemiology.EpidemicModel.rst.txt │ │ │ │ │ ├── gs_quant.models.epidemiology.SEIR.rst.txt │ │ │ │ │ ├── gs_quant.models.epidemiology.SIR.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.Window.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.LinearRegression.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.SEIRModel.rst.txt │ │ │ │ │ └── gs_quant.timeseries.statistics.SIRModel.rst.txt │ │ │ │ ├── data.rst.txt │ │ │ │ ├── datetime.rst.txt │ │ │ │ ├── functions/ │ │ │ │ │ ├── gs_quant.datetime.date.business_day_count.rst.txt │ │ │ │ │ ├── gs_quant.datetime.date.business_day_offset.rst.txt │ │ │ │ │ ├── gs_quant.datetime.date.date_range.rst.txt │ │ │ │ │ ├── gs_quant.datetime.date.is_business_day.rst.txt │ │ │ │ │ ├── gs_quant.datetime.date.prev_business_date.rst.txt │ │ │ │ │ ├── gs_quant.datetime.point.point_sort_order.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.abs_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.add.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.and_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.ceil.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.divide.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.exp.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.filter_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.floor.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.floordiv.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.if_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.log.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.multiply.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.not_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.or_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.power.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.repeat.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.smooth_spikes.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.sqrt.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.subtract.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.algebra.weighted_sum.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.count.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.diff.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.first.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.lag.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.last.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.last_value.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.analysis.weighted_sum.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.backtesting.basket.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.align.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.date_range.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.day.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.interpolate.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.month.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.prepend.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.quarter.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.union.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.value.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.weekday.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.datetime.year.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.annualize.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.beta.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.change.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.correlation.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.index.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.prices.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.returns.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.econometrics.volatility.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.cov.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.exponential_std.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.generate_series.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.max_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.mean.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.median.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.min_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.mode.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.percentile.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.percentiles.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.product.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.range_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.std.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.sum_.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.var.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.winsorize.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.statistics.zscores.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.technicals.moving_average.rst.txt │ │ │ │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.rst.txt │ │ │ │ │ └── gs_quant.timeseries.technicals.smoothed_moving_average.rst.txt │ │ │ │ ├── index.rst.txt │ │ │ │ ├── instrument.rst.txt │ │ │ │ ├── market.rst.txt │ │ │ │ ├── markets.rst.txt │ │ │ │ ├── models.rst.txt │ │ │ │ ├── risk.rst.txt │ │ │ │ └── timeseries.rst.txt │ │ │ ├── _static/ │ │ │ │ ├── basic.css │ │ │ │ ├── css/ │ │ │ │ │ └── theme.css │ │ │ │ ├── doctools.js │ │ │ │ ├── documentation_options.js │ │ │ │ ├── jquery-3.5.1.js │ │ │ │ ├── jquery.js │ │ │ │ ├── js/ │ │ │ │ │ └── theme.js │ │ │ │ ├── language_data.js │ │ │ │ ├── pygments.css │ │ │ │ ├── searchtools.js │ │ │ │ ├── underscore-1.3.1.js │ │ │ │ └── underscore.js │ │ │ ├── classes/ │ │ │ │ ├── gs_quant.base.Priceable.html │ │ │ │ ├── gs_quant.data.DataContext.html │ │ │ │ ├── gs_quant.data.Dataset.html │ │ │ │ ├── gs_quant.data.Fields.html │ │ │ │ ├── gs_quant.instrument.CommodOTCSwap.html │ │ │ │ ├── gs_quant.instrument.CommodSwap.html │ │ │ │ ├── gs_quant.instrument.EqCliquet.html │ │ │ │ ├── gs_quant.instrument.EqForward.html │ │ │ │ ├── gs_quant.instrument.EqOption.html │ │ │ │ ├── gs_quant.instrument.EqSynthetic.html │ │ │ │ ├── gs_quant.instrument.EqVarianceSwap.html │ │ │ │ ├── gs_quant.instrument.FXBinary.html │ │ │ │ ├── gs_quant.instrument.FXForward.html │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinary.html │ │ │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.html │ │ │ │ ├── gs_quant.instrument.FXOption.html │ │ │ │ ├── gs_quant.instrument.FXVolatilitySwap.html │ │ │ │ ├── gs_quant.instrument.Forward.html │ │ │ │ ├── gs_quant.instrument.IRBasisSwap.html │ │ │ │ ├── gs_quant.instrument.IRCMSOption.html │ │ │ │ ├── gs_quant.instrument.IRCMSOptionStrip.html │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOption.html │ │ │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.html │ │ │ │ ├── gs_quant.instrument.IRCap.html │ │ │ │ ├── gs_quant.instrument.IRFloor.html │ │ │ │ ├── gs_quant.instrument.IRSwap.html │ │ │ │ ├── gs_quant.instrument.IRSwaption.html │ │ │ │ ├── gs_quant.instrument.IRXccySwap.html │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFix.html │ │ │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.html │ │ │ │ ├── gs_quant.instrument.InflationSwap.html │ │ │ │ ├── gs_quant.instrument.Security.html │ │ │ │ ├── gs_quant.markets.HistoricalPricingContext.html │ │ │ │ ├── gs_quant.markets.PricingContext.html │ │ │ │ ├── gs_quant.markets.portfolio.Portfolio.html │ │ │ │ ├── gs_quant.markets.securities.Asset.html │ │ │ │ ├── gs_quant.markets.securities.AssetClass.html │ │ │ │ ├── gs_quant.markets.securities.AssetIdentifier.html │ │ │ │ ├── gs_quant.markets.securities.AssetType.html │ │ │ │ ├── gs_quant.markets.securities.Index.html │ │ │ │ ├── gs_quant.markets.securities.SecurityMaster.html │ │ │ │ ├── gs_quant.markets.securities.Stock.html │ │ │ │ ├── gs_quant.models.epidemiology.EpidemicModel.html │ │ │ │ ├── gs_quant.models.epidemiology.SEIR.html │ │ │ │ ├── gs_quant.models.epidemiology.SIR.html │ │ │ │ ├── gs_quant.timeseries.datetime.Window.html │ │ │ │ ├── gs_quant.timeseries.statistics.LinearRegression.html │ │ │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.html │ │ │ │ ├── gs_quant.timeseries.statistics.SEIRModel.html │ │ │ │ └── gs_quant.timeseries.statistics.SIRModel.html │ │ │ ├── data.html │ │ │ ├── datetime.html │ │ │ ├── functions/ │ │ │ │ ├── gs_quant.datetime.date.business_day_count.html │ │ │ │ ├── gs_quant.datetime.date.business_day_offset.html │ │ │ │ ├── gs_quant.datetime.date.date_range.html │ │ │ │ ├── gs_quant.datetime.date.is_business_day.html │ │ │ │ ├── gs_quant.datetime.date.prev_business_date.html │ │ │ │ ├── gs_quant.datetime.point.point_sort_order.html │ │ │ │ ├── gs_quant.timeseries.algebra.abs_.html │ │ │ │ ├── gs_quant.timeseries.algebra.add.html │ │ │ │ ├── gs_quant.timeseries.algebra.and_.html │ │ │ │ ├── gs_quant.timeseries.algebra.ceil.html │ │ │ │ ├── gs_quant.timeseries.algebra.divide.html │ │ │ │ ├── gs_quant.timeseries.algebra.exp.html │ │ │ │ ├── gs_quant.timeseries.algebra.filter_.html │ │ │ │ ├── gs_quant.timeseries.algebra.floor.html │ │ │ │ ├── gs_quant.timeseries.algebra.floordiv.html │ │ │ │ ├── gs_quant.timeseries.algebra.if_.html │ │ │ │ ├── gs_quant.timeseries.algebra.log.html │ │ │ │ ├── gs_quant.timeseries.algebra.multiply.html │ │ │ │ ├── gs_quant.timeseries.algebra.not_.html │ │ │ │ ├── gs_quant.timeseries.algebra.or_.html │ │ │ │ ├── gs_quant.timeseries.algebra.power.html │ │ │ │ ├── gs_quant.timeseries.algebra.repeat.html │ │ │ │ ├── gs_quant.timeseries.algebra.smooth_spikes.html │ │ │ │ ├── gs_quant.timeseries.algebra.sqrt.html │ │ │ │ ├── gs_quant.timeseries.algebra.subtract.html │ │ │ │ ├── gs_quant.timeseries.algebra.weighted_sum.html │ │ │ │ ├── gs_quant.timeseries.analysis.count.html │ │ │ │ ├── gs_quant.timeseries.analysis.diff.html │ │ │ │ ├── gs_quant.timeseries.analysis.first.html │ │ │ │ ├── gs_quant.timeseries.analysis.lag.html │ │ │ │ ├── gs_quant.timeseries.analysis.last.html │ │ │ │ ├── gs_quant.timeseries.analysis.last_value.html │ │ │ │ ├── gs_quant.timeseries.analysis.weighted_sum.html │ │ │ │ ├── gs_quant.timeseries.backtesting.basket.html │ │ │ │ ├── gs_quant.timeseries.datetime.align.html │ │ │ │ ├── gs_quant.timeseries.datetime.date_range.html │ │ │ │ ├── gs_quant.timeseries.datetime.day.html │ │ │ │ ├── gs_quant.timeseries.datetime.interpolate.html │ │ │ │ ├── gs_quant.timeseries.datetime.month.html │ │ │ │ ├── gs_quant.timeseries.datetime.prepend.html │ │ │ │ ├── gs_quant.timeseries.datetime.quarter.html │ │ │ │ ├── gs_quant.timeseries.datetime.union.html │ │ │ │ ├── gs_quant.timeseries.datetime.value.html │ │ │ │ ├── gs_quant.timeseries.datetime.weekday.html │ │ │ │ ├── gs_quant.timeseries.datetime.year.html │ │ │ │ ├── gs_quant.timeseries.econometrics.annualize.html │ │ │ │ ├── gs_quant.timeseries.econometrics.beta.html │ │ │ │ ├── gs_quant.timeseries.econometrics.change.html │ │ │ │ ├── gs_quant.timeseries.econometrics.correlation.html │ │ │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.html │ │ │ │ ├── gs_quant.timeseries.econometrics.index.html │ │ │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.html │ │ │ │ ├── gs_quant.timeseries.econometrics.prices.html │ │ │ │ ├── gs_quant.timeseries.econometrics.returns.html │ │ │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.html │ │ │ │ ├── gs_quant.timeseries.econometrics.volatility.html │ │ │ │ ├── gs_quant.timeseries.statistics.cov.html │ │ │ │ ├── gs_quant.timeseries.statistics.exponential_std.html │ │ │ │ ├── gs_quant.timeseries.statistics.generate_series.html │ │ │ │ ├── gs_quant.timeseries.statistics.max_.html │ │ │ │ ├── gs_quant.timeseries.statistics.mean.html │ │ │ │ ├── gs_quant.timeseries.statistics.median.html │ │ │ │ ├── gs_quant.timeseries.statistics.min_.html │ │ │ │ ├── gs_quant.timeseries.statistics.mode.html │ │ │ │ ├── gs_quant.timeseries.statistics.percentile.html │ │ │ │ ├── gs_quant.timeseries.statistics.percentiles.html │ │ │ │ ├── gs_quant.timeseries.statistics.product.html │ │ │ │ ├── gs_quant.timeseries.statistics.range_.html │ │ │ │ ├── gs_quant.timeseries.statistics.std.html │ │ │ │ ├── gs_quant.timeseries.statistics.sum_.html │ │ │ │ ├── gs_quant.timeseries.statistics.var.html │ │ │ │ ├── gs_quant.timeseries.statistics.winsorize.html │ │ │ │ ├── gs_quant.timeseries.statistics.zscores.html │ │ │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.html │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.html │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.html │ │ │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.html │ │ │ │ ├── gs_quant.timeseries.technicals.moving_average.html │ │ │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.html │ │ │ │ └── gs_quant.timeseries.technicals.smoothed_moving_average.html │ │ │ ├── genindex.html │ │ │ ├── index.html │ │ │ ├── instrument.html │ │ │ ├── market.html │ │ │ ├── markets.html │ │ │ ├── models.html │ │ │ ├── objects.inv │ │ │ ├── risk.html │ │ │ ├── search.html │ │ │ ├── searchindex.js │ │ │ └── timeseries.html │ │ └── search/ │ │ ├── search-index.json │ │ └── searchdata.json │ ├── _templates/ │ │ ├── contexts.rst │ │ ├── instruments.rst │ │ ├── models_class.rst │ │ ├── portfolio_manager.rst │ │ ├── processors.rst │ │ ├── report.rst │ │ └── timeseries_class.rst │ ├── _themes/ │ │ └── gs/ │ │ ├── LICENSE.txt │ │ ├── __init__.py │ │ ├── breadcrumbs.html │ │ ├── footer.html │ │ ├── layout.html │ │ ├── static/ │ │ │ ├── css/ │ │ │ │ └── theme.css │ │ │ └── js/ │ │ │ └── theme.js │ │ ├── theme.conf │ │ └── versions.html │ ├── analytics.rst │ ├── classes/ │ │ ├── gs_quant.analytics.datagrid.datagrid.DataGrid.rst │ │ ├── gs_quant.analytics.processors.AdditionProcessor.rst │ │ ├── gs_quant.analytics.processors.AppendProcessor.rst │ │ ├── gs_quant.analytics.processors.ChangeProcessor.rst │ │ ├── gs_quant.analytics.processors.CoordinateProcessor.rst │ │ ├── gs_quant.analytics.processors.CorrelationProcessor.rst │ │ ├── gs_quant.analytics.processors.DivisionProcessor.rst │ │ ├── gs_quant.analytics.processors.EntityProcessor.rst │ │ ├── gs_quant.analytics.processors.LastProcessor.rst │ │ ├── gs_quant.analytics.processors.MultiplicationProcessor.rst │ │ ├── gs_quant.analytics.processors.PercentilesProcessor.rst │ │ ├── gs_quant.analytics.processors.ReturnsProcessor.rst │ │ ├── gs_quant.analytics.processors.SharpeRatioProcessor.rst │ │ ├── gs_quant.analytics.processors.SubtractionProcessor.rst │ │ ├── gs_quant.analytics.processors.VolatilityProcessor.rst │ │ ├── gs_quant.analytics.workspaces.Component.rst │ │ ├── gs_quant.analytics.workspaces.Workspace.rst │ │ ├── gs_quant.base.Priceable.rst │ │ ├── gs_quant.data.DataContext.rst │ │ ├── gs_quant.data.Dataset.rst │ │ ├── gs_quant.data.Fields.rst │ │ ├── gs_quant.data.core.DataContext.rst │ │ ├── gs_quant.data.dataset.Dataset.rst │ │ ├── gs_quant.data.fields.Fields.rst │ │ ├── gs_quant.datetime.relative_date.RelativeDate.rst │ │ ├── gs_quant.instrument.CommodOTCSwap.rst │ │ ├── gs_quant.instrument.EqCliquet.rst │ │ ├── gs_quant.instrument.EqForward.rst │ │ ├── gs_quant.instrument.EqOption.rst │ │ ├── gs_quant.instrument.EqSynthetic.rst │ │ ├── gs_quant.instrument.EqVarianceSwap.rst │ │ ├── gs_quant.instrument.FXAccumulator.rst │ │ ├── gs_quant.instrument.FXAccumulatorScheduleLeg.rst │ │ ├── gs_quant.instrument.FXBinary.rst │ │ ├── gs_quant.instrument.FXCorrelationSwap.rst │ │ ├── gs_quant.instrument.FXCorrelationSwapLeg.rst │ │ ├── gs_quant.instrument.FXDoubleKnockout.rst │ │ ├── gs_quant.instrument.FXDoubleOneTouch.rst │ │ ├── gs_quant.instrument.FXDualDoubleKnockout.rst │ │ ├── gs_quant.instrument.FXDualDoubleKnockoutLeg.rst │ │ ├── gs_quant.instrument.FXEuropeanKnockout.rst │ │ ├── gs_quant.instrument.FXForward.rst │ │ ├── gs_quant.instrument.FXKnockout.rst │ │ ├── gs_quant.instrument.FXMultiCrossBinary.rst │ │ ├── gs_quant.instrument.FXMultiCrossBinaryLeg.rst │ │ ├── gs_quant.instrument.FXMultiCrossDoubleBinary.rst │ │ ├── gs_quant.instrument.FXMultiCrossDoubleBinaryLeg.rst │ │ ├── gs_quant.instrument.FXMultiCrossDoubleOneTouch.rst │ │ ├── gs_quant.instrument.FXMultiCrossDoubleOneTouchLeg.rst │ │ ├── gs_quant.instrument.FXOneTouch.rst │ │ ├── gs_quant.instrument.FXOption.rst │ │ ├── gs_quant.instrument.FXOptionLeg.rst │ │ ├── gs_quant.instrument.FXOptionStrategy.rst │ │ ├── gs_quant.instrument.FXPivot.rst │ │ ├── gs_quant.instrument.FXPivotScheduleLeg.rst │ │ ├── gs_quant.instrument.FXShiftingBermForward.rst │ │ ├── gs_quant.instrument.FXTarf.rst │ │ ├── gs_quant.instrument.FXTarfScheduleLeg.rst │ │ ├── gs_quant.instrument.FXVarianceSwap.rst │ │ ├── gs_quant.instrument.FXVolatilitySwap.rst │ │ ├── gs_quant.instrument.FXWorstOf.rst │ │ ├── gs_quant.instrument.FXWorstOfKO.rst │ │ ├── gs_quant.instrument.FXWorstOfKOLeg.rst │ │ ├── gs_quant.instrument.Forward.rst │ │ ├── gs_quant.instrument.IRBasisSwap.rst │ │ ├── gs_quant.instrument.IRCMSOption.rst │ │ ├── gs_quant.instrument.IRCMSOptionStrip.rst │ │ ├── gs_quant.instrument.IRCMSSpreadOption.rst │ │ ├── gs_quant.instrument.IRCMSSpreadOptionStrip.rst │ │ ├── gs_quant.instrument.IRCap.rst │ │ ├── gs_quant.instrument.IRFloor.rst │ │ ├── gs_quant.instrument.IRSwap.rst │ │ ├── gs_quant.instrument.IRSwaption.rst │ │ ├── gs_quant.instrument.IRXccySwap.rst │ │ ├── gs_quant.instrument.IRXccySwapFixFix.rst │ │ ├── gs_quant.instrument.IRXccySwapFixFlt.rst │ │ ├── gs_quant.instrument.InflationSwap.rst │ │ ├── gs_quant.instrument.Security.rst │ │ ├── gs_quant.markets.baskets.Basket.rst │ │ ├── gs_quant.markets.core.PricingContext.rst │ │ ├── gs_quant.markets.historical.HistoricalPricingContext.rst │ │ ├── gs_quant.markets.index.Index.rst │ │ ├── gs_quant.markets.indices_utils.BasketType.rst │ │ ├── gs_quant.markets.indices_utils.CorporateActionType.rst │ │ ├── gs_quant.markets.indices_utils.CustomBasketStyles.rst │ │ ├── gs_quant.markets.indices_utils.FundamentalMetricPeriod.rst │ │ ├── gs_quant.markets.indices_utils.FundamentalMetricPeriodDirection.rst │ │ ├── gs_quant.markets.indices_utils.FundamentalsMetrics.rst │ │ ├── gs_quant.markets.indices_utils.IndicesDatasets.rst │ │ ├── gs_quant.markets.indices_utils.Region.rst │ │ ├── gs_quant.markets.indices_utils.ResearchBasketStyles.rst │ │ ├── gs_quant.markets.indices_utils.ReturnType.rst │ │ ├── gs_quant.markets.indices_utils.WeightingStrategy.rst │ │ ├── gs_quant.markets.portfolio.Grid.rst │ │ ├── gs_quant.markets.portfolio.Portfolio.rst │ │ ├── gs_quant.markets.portfolio_manager.PortfolioManager.rst │ │ ├── gs_quant.markets.position_set.Position.rst │ │ ├── gs_quant.markets.position_set.PositionSet.rst │ │ ├── gs_quant.markets.report.FactorRiskReport.rst │ │ ├── gs_quant.markets.report.PerformanceReport.rst │ │ ├── gs_quant.markets.report.Report.rst │ │ ├── gs_quant.markets.report.ReportJobFuture.rst │ │ ├── gs_quant.markets.report.ThematicReport.rst │ │ ├── gs_quant.markets.securities.Asset.rst │ │ ├── gs_quant.markets.securities.AssetClass.rst │ │ ├── gs_quant.markets.securities.AssetIdentifier.rst │ │ ├── gs_quant.markets.securities.AssetType.rst │ │ ├── gs_quant.markets.securities.SecurityMaster.rst │ │ ├── gs_quant.markets.securities.Stock.rst │ │ ├── gs_quant.models.epidemiology.EpidemicModel.rst │ │ ├── gs_quant.models.epidemiology.SEIR.rst │ │ ├── gs_quant.models.epidemiology.SIR.rst │ │ ├── gs_quant.models.risk_model.FactorRiskModel.rst │ │ ├── gs_quant.models.risk_model.MacroRiskModel.rst │ │ ├── gs_quant.models.risk_model.MarqueeRiskModel.rst │ │ ├── gs_quant.models.risk_model.RiskModel.rst │ │ ├── gs_quant.models.risk_model.ThematicRiskModel.rst │ │ ├── gs_quant.timeseries.backtesting.Basket.rst │ │ ├── gs_quant.timeseries.datetime.Window.rst │ │ ├── gs_quant.timeseries.statistics.LinearRegression.rst │ │ ├── gs_quant.timeseries.statistics.RollingLinearRegression.rst │ │ ├── gs_quant.timeseries.statistics.SEIRModel.rst │ │ └── gs_quant.timeseries.statistics.SIRModel.rst │ ├── conf.py │ ├── data.rst │ ├── datetime.rst │ ├── entities.rst │ ├── functions/ │ │ ├── gs_quant.datetime.date.business_day_count.rst │ │ ├── gs_quant.datetime.date.business_day_offset.rst │ │ ├── gs_quant.datetime.date.date_range.rst │ │ ├── gs_quant.datetime.date.is_business_day.rst │ │ ├── gs_quant.datetime.date.prev_business_date.rst │ │ ├── gs_quant.datetime.point.point_sort_order.rst │ │ ├── gs_quant.markets.baskets.Basket.add_factor_risk_report.rst │ │ ├── gs_quant.markets.baskets.Basket.cancel_rebalance.rst │ │ ├── gs_quant.markets.baskets.Basket.clone.rst │ │ ├── gs_quant.markets.baskets.Basket.create.rst │ │ ├── gs_quant.markets.baskets.Basket.delete_factor_risk_report.rst │ │ ├── gs_quant.markets.baskets.Basket.entity_type.rst │ │ ├── gs_quant.markets.baskets.Basket.get.rst │ │ ├── gs_quant.markets.baskets.Basket.get_close_price_for_date.rst │ │ ├── gs_quant.markets.baskets.Basket.get_close_prices.rst │ │ ├── gs_quant.markets.baskets.Basket.get_corporate_actions.rst │ │ ├── gs_quant.markets.baskets.Basket.get_data_coordinate.rst │ │ ├── gs_quant.markets.baskets.Basket.get_data_series.rst │ │ ├── gs_quant.markets.baskets.Basket.get_details.rst │ │ ├── gs_quant.markets.baskets.Basket.get_entity.rst │ │ ├── gs_quant.markets.baskets.Basket.get_fundamentals.rst │ │ ├── gs_quant.markets.baskets.Basket.get_identifier.rst │ │ ├── gs_quant.markets.baskets.Basket.get_identifiers.rst │ │ ├── gs_quant.markets.baskets.Basket.get_latest_close_price.rst │ │ ├── gs_quant.markets.baskets.Basket.get_latest_position_set.rst │ │ ├── gs_quant.markets.baskets.Basket.get_latest_rebalance_data.rst │ │ ├── gs_quant.markets.baskets.Basket.get_latest_rebalance_date.rst │ │ ├── gs_quant.markets.baskets.Basket.get_live_date.rst │ │ ├── gs_quant.markets.baskets.Basket.get_marquee_id.rst │ │ ├── gs_quant.markets.baskets.Basket.get_position_set_for_date.rst │ │ ├── gs_quant.markets.baskets.Basket.get_position_sets.rst │ │ ├── gs_quant.markets.baskets.Basket.get_positions_data.rst │ │ ├── gs_quant.markets.baskets.Basket.get_rebalance_approval_status.rst │ │ ├── gs_quant.markets.baskets.Basket.get_type.rst │ │ ├── gs_quant.markets.baskets.Basket.get_unique_entity_key.rst │ │ ├── gs_quant.markets.baskets.Basket.get_url.rst │ │ ├── gs_quant.markets.baskets.Basket.poll_report.rst │ │ ├── gs_quant.markets.baskets.Basket.poll_status.rst │ │ ├── gs_quant.markets.baskets.Basket.update.rst │ │ ├── gs_quant.markets.baskets.Basket.upload_position_history.rst │ │ ├── gs_quant.markets.index.Index.get.rst │ │ ├── gs_quant.markets.index.Index.get_close_price_for_date.rst │ │ ├── gs_quant.markets.index.Index.get_close_prices.rst │ │ ├── gs_quant.markets.index.Index.get_constituent_instruments.rst │ │ ├── gs_quant.markets.index.Index.get_constituent_instruments_for_date.rst │ │ ├── gs_quant.markets.index.Index.get_constituents.rst │ │ ├── gs_quant.markets.index.Index.get_constituents_for_date.rst │ │ ├── gs_quant.markets.index.Index.get_currency.rst │ │ ├── gs_quant.markets.index.Index.get_data_coordinate.rst │ │ ├── gs_quant.markets.index.Index.get_data_series.rst │ │ ├── gs_quant.markets.index.Index.get_entitlements.rst │ │ ├── gs_quant.markets.index.Index.get_entity.rst │ │ ├── gs_quant.markets.index.Index.get_factor_risk_report.rst │ │ ├── gs_quant.markets.index.Index.get_fundamentals.rst │ │ ├── gs_quant.markets.index.Index.get_identifier.rst │ │ ├── gs_quant.markets.index.Index.get_identifiers.rst │ │ ├── gs_quant.markets.index.Index.get_latest_close_price.rst │ │ ├── gs_quant.markets.index.Index.get_latest_constituent_instruments.rst │ │ ├── gs_quant.markets.index.Index.get_latest_constituents.rst │ │ ├── gs_quant.markets.index.Index.get_latest_position_set.rst │ │ ├── gs_quant.markets.index.Index.get_marquee_id.rst │ │ ├── gs_quant.markets.index.Index.get_position_dates.rst │ │ ├── gs_quant.markets.index.Index.get_position_set_for_date.rst │ │ ├── gs_quant.markets.index.Index.get_position_sets.rst │ │ ├── gs_quant.markets.index.Index.get_positions_data.rst │ │ ├── gs_quant.markets.index.Index.get_return_type.rst │ │ ├── gs_quant.markets.index.Index.get_status_of_reports.rst │ │ ├── gs_quant.markets.index.Index.get_type.rst │ │ ├── gs_quant.markets.index.Index.get_underlier_attribution.rst │ │ ├── gs_quant.markets.index.Index.get_underlier_tree.rst │ │ ├── gs_quant.markets.index.Index.get_underlier_weights.rst │ │ ├── gs_quant.markets.index.Index.get_unique_entity_key.rst │ │ ├── gs_quant.markets.index.Index.get_url.rst │ │ ├── gs_quant.markets.index.Index.update_positions.rst │ │ ├── gs_quant.markets.index.Index.visualise_tree.rst │ │ ├── gs_quant.markets.indices_utils.get_flagship_baskets.rst │ │ ├── gs_quant.markets.indices_utils.get_flagships_constituents.rst │ │ ├── gs_quant.markets.indices_utils.get_flagships_performance.rst │ │ ├── gs_quant.markets.indices_utils.get_flagships_with_assets.rst │ │ ├── gs_quant.markets.indices_utils.get_my_baskets.rst │ │ ├── gs_quant.markets.position_set.PositionSet.equalize_position_weights.rst │ │ ├── gs_quant.markets.position_set.PositionSet.from_dicts.rst │ │ ├── gs_quant.markets.position_set.PositionSet.from_frame.rst │ │ ├── gs_quant.markets.position_set.PositionSet.from_list.rst │ │ ├── gs_quant.markets.position_set.PositionSet.get_positions.rst │ │ ├── gs_quant.markets.position_set.PositionSet.get_unpriced_positions.rst │ │ ├── gs_quant.markets.position_set.PositionSet.get_unresolved_positions.rst │ │ ├── gs_quant.markets.position_set.PositionSet.price.rst │ │ ├── gs_quant.markets.position_set.PositionSet.price_many.rst │ │ ├── gs_quant.markets.position_set.PositionSet.remove_unpriced_positions.rst │ │ ├── gs_quant.markets.position_set.PositionSet.remove_unresolved_positions.rst │ │ ├── gs_quant.markets.position_set.PositionSet.resolve.rst │ │ ├── gs_quant.markets.position_set.PositionSet.resolve_many.rst │ │ ├── gs_quant.markets.position_set.PositionSet.to_frame.rst │ │ ├── gs_quant.timeseries.algebra.abs_.rst │ │ ├── gs_quant.timeseries.algebra.add.rst │ │ ├── gs_quant.timeseries.algebra.and_.rst │ │ ├── gs_quant.timeseries.algebra.ceil.rst │ │ ├── gs_quant.timeseries.algebra.divide.rst │ │ ├── gs_quant.timeseries.algebra.exp.rst │ │ ├── gs_quant.timeseries.algebra.filter_.rst │ │ ├── gs_quant.timeseries.algebra.filter_dates.rst │ │ ├── gs_quant.timeseries.algebra.floor.rst │ │ ├── gs_quant.timeseries.algebra.floordiv.rst │ │ ├── gs_quant.timeseries.algebra.if_.rst │ │ ├── gs_quant.timeseries.algebra.log.rst │ │ ├── gs_quant.timeseries.algebra.multiply.rst │ │ ├── gs_quant.timeseries.algebra.not_.rst │ │ ├── gs_quant.timeseries.algebra.or_.rst │ │ ├── gs_quant.timeseries.algebra.power.rst │ │ ├── gs_quant.timeseries.algebra.sqrt.rst │ │ ├── gs_quant.timeseries.algebra.subtract.rst │ │ ├── gs_quant.timeseries.algebra.weighted_sum.rst │ │ ├── gs_quant.timeseries.analysis.compare.rst │ │ ├── gs_quant.timeseries.analysis.count.rst │ │ ├── gs_quant.timeseries.analysis.diff.rst │ │ ├── gs_quant.timeseries.analysis.first.rst │ │ ├── gs_quant.timeseries.analysis.lag.rst │ │ ├── gs_quant.timeseries.analysis.last.rst │ │ ├── gs_quant.timeseries.analysis.last_value.rst │ │ ├── gs_quant.timeseries.backtesting.basket_series.rst │ │ ├── gs_quant.timeseries.datetime.align.rst │ │ ├── gs_quant.timeseries.datetime.bucketize.rst │ │ ├── gs_quant.timeseries.datetime.date_range.rst │ │ ├── gs_quant.timeseries.datetime.day.rst │ │ ├── gs_quant.timeseries.datetime.interpolate.rst │ │ ├── gs_quant.timeseries.datetime.month.rst │ │ ├── gs_quant.timeseries.datetime.prepend.rst │ │ ├── gs_quant.timeseries.datetime.quarter.rst │ │ ├── gs_quant.timeseries.datetime.union.rst │ │ ├── gs_quant.timeseries.datetime.value.rst │ │ ├── gs_quant.timeseries.datetime.weekday.rst │ │ ├── gs_quant.timeseries.datetime.year.rst │ │ ├── gs_quant.timeseries.econometrics.annualize.rst │ │ ├── gs_quant.timeseries.econometrics.beta.rst │ │ ├── gs_quant.timeseries.econometrics.change.rst │ │ ├── gs_quant.timeseries.econometrics.correlation.rst │ │ ├── gs_quant.timeseries.econometrics.excess_returns_.rst │ │ ├── gs_quant.timeseries.econometrics.index.rst │ │ ├── gs_quant.timeseries.econometrics.max_drawdown.rst │ │ ├── gs_quant.timeseries.econometrics.prices.rst │ │ ├── gs_quant.timeseries.econometrics.returns.rst │ │ ├── gs_quant.timeseries.econometrics.sharpe_ratio.rst │ │ ├── gs_quant.timeseries.econometrics.volatility.rst │ │ ├── gs_quant.timeseries.statistics.cov.rst │ │ ├── gs_quant.timeseries.statistics.exponential_std.rst │ │ ├── gs_quant.timeseries.statistics.generate_series.rst │ │ ├── gs_quant.timeseries.statistics.max_.rst │ │ ├── gs_quant.timeseries.statistics.mean.rst │ │ ├── gs_quant.timeseries.statistics.median.rst │ │ ├── gs_quant.timeseries.statistics.min_.rst │ │ ├── gs_quant.timeseries.statistics.mode.rst │ │ ├── gs_quant.timeseries.statistics.percentile.rst │ │ ├── gs_quant.timeseries.statistics.percentiles.rst │ │ ├── gs_quant.timeseries.statistics.product.rst │ │ ├── gs_quant.timeseries.statistics.range_.rst │ │ ├── gs_quant.timeseries.statistics.std.rst │ │ ├── gs_quant.timeseries.statistics.sum_.rst │ │ ├── gs_quant.timeseries.statistics.var.rst │ │ ├── gs_quant.timeseries.statistics.winsorize.rst │ │ ├── gs_quant.timeseries.statistics.zscores.rst │ │ ├── gs_quant.timeseries.technicals.bollinger_bands.rst │ │ ├── gs_quant.timeseries.technicals.exponential_moving_average.rst │ │ ├── gs_quant.timeseries.technicals.exponential_spread_volatility.rst │ │ ├── gs_quant.timeseries.technicals.exponential_volatility.rst │ │ ├── gs_quant.timeseries.technicals.macd.rst │ │ ├── gs_quant.timeseries.technicals.moving_average.rst │ │ ├── gs_quant.timeseries.technicals.relative_strength_index.rst │ │ ├── gs_quant.timeseries.technicals.seasonally_adjusted.rst │ │ ├── gs_quant.timeseries.technicals.smoothed_moving_average.rst │ │ └── gs_quant.timeseries.technicals.trend.rst │ ├── html/ │ │ ├── .doctrees/ │ │ │ ├── environment.pickle │ │ │ ├── index.doctree │ │ │ └── timeseries.doctree │ │ ├── _sources/ │ │ │ └── timeseries.rst.txt │ │ ├── objects.inv │ │ └── searchindex.js │ ├── index.rst │ ├── instrument.rst │ ├── make.bat │ ├── markets.rst │ ├── models.rst │ ├── module/ │ │ └── models.rst │ ├── modules/ │ │ └── gs_quant.markets.indices_utils.rst │ ├── risk.rst │ ├── searchdataext/ │ │ └── __init__.py │ └── timeseries.rst ├── gs_quant/ │ ├── __init__.py │ ├── _version.py │ ├── analytics/ │ │ ├── __init__.py │ │ ├── common/ │ │ │ ├── __init__.py │ │ │ ├── constants.py │ │ │ ├── enumerators.py │ │ │ └── helpers.py │ │ ├── core/ │ │ │ ├── __init__.py │ │ │ ├── processor.py │ │ │ ├── processor_result.py │ │ │ └── query_helpers.py │ │ ├── datagrid/ │ │ │ ├── __init__.py │ │ │ ├── data_cell.py │ │ │ ├── data_column.py │ │ │ ├── data_row.py │ │ │ ├── datagrid.py │ │ │ ├── serializers.py │ │ │ └── utils.py │ │ ├── processors/ │ │ │ ├── __init__.py │ │ │ ├── analysis_processors.py │ │ │ ├── econometrics_processors.py │ │ │ ├── scale_processors.py │ │ │ ├── special_processors.py │ │ │ ├── statistics_processors.py │ │ │ └── utility_processors.py │ │ └── workspaces/ │ │ ├── __init__.py │ │ ├── components.py │ │ └── workspace.py │ ├── api/ │ │ ├── __init__.py │ │ ├── api_cache.py │ │ ├── api_session.py │ │ ├── data.py │ │ ├── fred/ │ │ │ ├── __init__.py │ │ │ ├── data.py │ │ │ └── fred_query.py │ │ ├── gs/ │ │ │ ├── __init__.py │ │ │ ├── assets.py │ │ │ ├── backtests.py │ │ │ ├── backtests_xasset/ │ │ │ │ ├── __init__.py │ │ │ │ ├── apis.py │ │ │ │ ├── json_encoders/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── request_encoders.py │ │ │ │ │ ├── response_datatypes/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── generic_datatype_encoders.py │ │ │ │ │ │ ├── risk_result_datatype_encoders.py │ │ │ │ │ │ ├── risk_result_encoders.py │ │ │ │ │ │ └── test_backtest_datatypes_encoders.py │ │ │ │ │ └── response_encoders.py │ │ │ │ ├── request.py │ │ │ │ ├── response.py │ │ │ │ └── response_datatypes/ │ │ │ │ ├── __init__.py │ │ │ │ ├── backtest_datatypes.py │ │ │ │ ├── generic_backtest_datatypes.py │ │ │ │ ├── risk_result.py │ │ │ │ └── risk_result_datatypes.py │ │ │ ├── base_screener.py │ │ │ ├── carbon.py │ │ │ ├── content.py │ │ │ ├── countries.py │ │ │ ├── data.py │ │ │ ├── data_screen.py │ │ │ ├── datagrid.py │ │ │ ├── esg.py │ │ │ ├── federated_secmaster.py │ │ │ ├── groups.py │ │ │ ├── hedges.py │ │ │ ├── indices.py │ │ │ ├── monitors.py │ │ │ ├── parser.py │ │ │ ├── plots.py │ │ │ ├── portfolios.py │ │ │ ├── price.py │ │ │ ├── reports.py │ │ │ ├── risk.py │ │ │ ├── risk_models.py │ │ │ ├── scenarios.py │ │ │ ├── screens.py │ │ │ ├── secmaster.py │ │ │ ├── thematics.py │ │ │ ├── users.py │ │ │ └── workspaces.py │ │ ├── risk.py │ │ └── utils.py │ ├── backtests/ │ │ ├── SKILL.md │ │ ├── __init__.py │ │ ├── action_handler.py │ │ ├── actions.py │ │ ├── backtest_engine.py │ │ ├── backtest_objects.py │ │ ├── backtest_utils.py │ │ ├── core.py │ │ ├── data_handler.py │ │ ├── data_sources.py │ │ ├── decorator.py │ │ ├── equity_vol_engine.py │ │ ├── event.py │ │ ├── execution_engine.py │ │ ├── generic_engine.py │ │ ├── generic_engine_action_impls.py │ │ ├── order.py │ │ ├── predefined_asset_engine.py │ │ ├── strategy.py │ │ ├── strategy_systematic.py │ │ └── triggers.py │ ├── base.py │ ├── common.py │ ├── config/ │ │ ├── __init__.py │ │ └── options.py │ ├── config.ini │ ├── content/ │ │ ├── Contents.ipynb │ │ ├── Index.ipynb │ │ ├── README.md │ │ ├── __init__.py │ │ ├── events/ │ │ │ └── 00_gsquant_meets_markets/ │ │ │ ├── 00_us_election_analysis/ │ │ │ │ ├── 0000_macro_big_picture.ipynb │ │ │ │ ├── 0001_portfolios_and_var.ipynb │ │ │ │ ├── 0002_past_elections.ipynb │ │ │ │ └── 0003_trades.ipynb │ │ │ ├── 01_ideas_for_risk_re_rating/ │ │ │ │ ├── eq_sx5e_spx_vol_spread_trade.ipynb │ │ │ │ ├── fx_covid19_recovery_trade.ipynb │ │ │ │ └── inflation_covid19_recovery_trade.ipynb │ │ │ ├── 02_optimizing_equity_trading/ │ │ │ │ ├── qes_utils.py │ │ │ │ ├── quants_meet_markets_qes.ipynb │ │ │ │ ├── section_a_liquidity_and_clusters.ipynb │ │ │ │ ├── section_b_ownership.ipynb │ │ │ │ ├── section_c_apex.ipynb │ │ │ │ └── trade_list_world.csv │ │ │ └── 03_esg_basket_portfolio_optimisation/ │ │ │ └── quants_meet_markets_msci.ipynb │ │ ├── made_with_gs_quant/ │ │ │ ├── 1-Navigating Rates.ipynb │ │ │ ├── 10-Explaining Performance Drivers.ipynb │ │ │ ├── 11-FX Election Hedge.ipynb │ │ │ ├── 12-Structuring for Uncertaintly.ipynb │ │ │ ├── 13-Cyclicals.ipynb │ │ │ ├── 14-Curve Inversions.ipynb │ │ │ ├── 15-Hypothetical Lifetime Risk Calculator.ipynb │ │ │ ├── 2-Levels and Tails.ipynb │ │ │ ├── 3-Systematic Selling.ipynb │ │ │ ├── 4-Delta Hedging.ipynb │ │ │ ├── 5-What's New.ipynb │ │ │ ├── 6-Evolving Correlations.ipynb │ │ │ ├── 7-Predicting Performance and Live Risk.ipynb │ │ │ ├── 8-What's New Internal.ipynb │ │ │ └── 9-Hedging using Machine Learning Techniques.ipynb │ │ └── reports_and_screens/ │ │ ├── 00_fx/ │ │ │ ├── 0000_vol_screen.ipynb │ │ │ ├── 0001_vol_calendar_screen.ipynb │ │ │ ├── 0002_forward_vol_screen.ipynb │ │ │ ├── 0003_10x_binary_screen.ipynb │ │ │ ├── 0004_bear_put_spread_screen.ipynb │ │ │ ├── 0005_vol_skew.ipynb │ │ │ ├── 0006_vol_swap_spread.ipynb │ │ │ ├── 0007_eq_fx_hedges.ipynb │ │ │ ├── __init__.py │ │ │ └── vol_screen_app.py │ │ ├── 02_rates/ │ │ │ ├── 0000_vol_fixed_strike_grid.ipynb │ │ │ ├── 0001_vol_moneyness_screen.ipynb │ │ │ ├── 0002_swaption_carry_grid.ipynb │ │ │ └── 0003_spot_vol_shock.ipynb │ │ ├── 03_prime/ │ │ │ ├── 0001_gs_pb_data_case_study_sector_positioning.ipynb │ │ │ ├── 0002_gs_pb_data_case_study_flows.ipynb │ │ │ ├── 0003_gs_pb_data_case_study_factors.ipynb │ │ │ ├── 0004_gs_pb_data_case_study_country_positioning.ipynb │ │ │ └── 0005_gs_pb_data_case_study_leverage.ipynb │ │ ├── README.md │ │ └── __init__.py │ ├── context_base.py │ ├── data/ │ │ ├── __init__.py │ │ ├── coordinate.py │ │ ├── core.py │ │ ├── dataset.py │ │ ├── fields.py │ │ ├── log.py │ │ ├── query.py │ │ ├── stream.py │ │ └── utilities.py │ ├── datetime/ │ │ ├── __init__.py │ │ ├── date.py │ │ ├── gscalendar.py │ │ ├── point.py │ │ ├── relative_date.py │ │ ├── rules.py │ │ └── time.py │ ├── documentation/ │ │ ├── 00_data/ │ │ │ ├── 00_datasets/ │ │ │ │ └── examples/ │ │ │ │ ├── 0000_query_dataset.ipynb │ │ │ │ ├── 0001_get_dataset_coverage.ipynb │ │ │ │ ├── 0002_using_data_contexts.ipynb │ │ │ │ ├── 0003_get_data_using_coordinate.ipynb │ │ │ │ ├── 0004_get_all_assets_from_region.ipynb │ │ │ │ ├── 0005_get_vol_surface.ipynb │ │ │ │ ├── 0006_ptp_dataset.ipynb │ │ │ │ ├── 0007_query_fxvol.script.ipynb │ │ │ │ └── 0008_s3_partners_short_interest.ipynb │ │ │ ├── 01_analytics/ │ │ │ │ └── examples/ │ │ │ │ ├── 0000_charting_data.ipynb │ │ │ │ └── 0001_exporting_data.ipynb │ │ │ ├── 02_workspaces/ │ │ │ │ └── examples/ │ │ │ │ └── 0001_creating_a_workspace.ipynb │ │ │ ├── 03_visualizations/ │ │ │ │ └── examples/ │ │ │ │ └── 0001_creating_a_visualization.ipynb │ │ │ ├── 04_screens/ │ │ │ │ └── examples/ │ │ │ │ ├── 00_base_screener_api_tutorial.ipynb │ │ │ │ └── 01_screen_api_tutorial.ipynb │ │ │ └── covid/ │ │ │ └── Comparing, Reconciling, and Combining COVID-19 Data Sources.ipynb │ │ ├── 01_markets/ │ │ │ ├── 00_securities/ │ │ │ │ └── examples/ │ │ │ │ └── 0000_get_an_asset_from_identifier.ipynb │ │ │ └── 02_rdates/ │ │ │ └── examples/ │ │ │ ├── 0000_get_a_date_relative_from_today.ipynb │ │ │ ├── 0001_get_a_date_relative_from_a_base_date.ipynb │ │ │ ├── 0002_get_a_date_relative_using_pricing_context.ipynb │ │ │ ├── 0003_get_a_date_using_a_business_day_calendar.ipynb │ │ │ ├── 0004_chaining_relativedate_rules.ipynb │ │ │ └── 0005_passing_your_own_holiday_calendar.ipynb │ │ ├── 02_pricing_and_risk/ │ │ │ ├── 00_instruments_and_measures/ │ │ │ │ ├── examples/ │ │ │ │ │ ├── 00_instrument_basics/ │ │ │ │ │ │ ├── 01_view-trade-properties.ipynb │ │ │ │ │ │ ├── 02_get-a-property.ipynb │ │ │ │ │ │ ├── 03_set-a-property.ipynb │ │ │ │ │ │ ├── 04_enum-property.ipynb │ │ │ │ │ │ ├── 05_resolve-a-trade.ipynb │ │ │ │ │ │ ├── 06_market-data.ipynb │ │ │ │ │ │ └── 07_float-with-info.ipynb │ │ │ │ │ ├── 01_rates/ │ │ │ │ │ │ ├── 01_view_swap_definition.ipynb │ │ │ │ │ │ ├── 02_swap_trade_construction.ipynb │ │ │ │ │ │ ├── 03_calc_swap_price.ipynb │ │ │ │ │ │ ├── 04_calc_swap_risk_measures.ipynb │ │ │ │ │ │ ├── 05_calc_swap_price_in_pricing_context.ipynb │ │ │ │ │ │ ├── 06_calc_swap_price_historically.ipynb │ │ │ │ │ │ ├── 07_calc_swap_risks_in_pricing_context.ipynb │ │ │ │ │ │ ├── 08_calc_swap_risk_historically.ipynb │ │ │ │ │ │ ├── 09_swaption_trade_construction.ipynb │ │ │ │ │ │ ├── 10_straddle_price.ipynb │ │ │ │ │ │ ├── 11_midcurve_swaption_price.ipynb │ │ │ │ │ │ ├── 12_swap_future_cashflows.ipynb │ │ │ │ │ │ ├── 13_calc_xccy_swap_price.ipynb │ │ │ │ │ │ ├── 14_calc_xccy_swap_risk_measures.ipynb │ │ │ │ │ │ ├── 15_spread_option_grid_pricing.ipynb │ │ │ │ │ │ ├── 16_change_discount_curve.ipynb │ │ │ │ │ │ ├── 17_calc_xccy_swap_cashflows.ipynb │ │ │ │ │ │ ├── 18_solve_present_value.ipynb │ │ │ │ │ │ ├── 19_solve_delta.ipynb │ │ │ │ │ │ ├── 20_fix_float_legs_price.ipynb │ │ │ │ │ │ ├── 21_asset_swap_definition.ipynb │ │ │ │ │ │ ├── 22_cap_floor.ipynb │ │ │ │ │ │ └── 23_solve_vanna_&_volga.ipynb │ │ │ │ │ ├── 02_fx/ │ │ │ │ │ │ ├── 01_fx_fwd_trade_construction.ipynb │ │ │ │ │ │ ├── 02_fx_option_trade_construction.ipynb │ │ │ │ │ │ ├── 03_fx_vol_swap_trade_construction.ipynb │ │ │ │ │ │ ├── 04_fx_binary_trade_construction.ipynb │ │ │ │ │ │ ├── 05_calc_option_measures.ipynb │ │ │ │ │ │ ├── 06_fx_var_swap_trade_construction.ipynb │ │ │ │ │ │ ├── 07_fx_knockout_trade_construction.ipynb │ │ │ │ │ │ ├── 08_fx_double_touch_trade_construction.ipynb │ │ │ │ │ │ ├── 09_fx_delta_measures.ipynb │ │ │ │ │ │ └── 10_fx_gamma_measures.ipynb │ │ │ │ │ ├── 03_eq/ │ │ │ │ │ │ ├── 000306_calc_eq_option_greeks.ipynb │ │ │ │ │ │ ├── 01_calc_eq_option_price.ipynb │ │ │ │ │ │ ├── 02_calc_eq_option_risk_measures.ipynb │ │ │ │ │ │ ├── 03_calc_eq_option_price_and_risk_in_pricing_context.ipynb │ │ │ │ │ │ ├── 04_calc_eq_option_price_and_risk_historically.ipynb │ │ │ │ │ │ └── 05_calc_eq_option_portfolio_greeks.ipynb │ │ │ │ │ └── 04_credit/ │ │ │ │ │ ├── 01_cdindex_option_price.ipynb │ │ │ │ │ ├── 02_cdindex_option_xover_payer_spread.ipynb │ │ │ │ │ ├── 03_cdindex_option_risks.ipynb │ │ │ │ │ ├── 04_cdindex_price.ipynb │ │ │ │ │ └── 05_cdindex_roll_price.ipynb │ │ │ │ └── tutorials/ │ │ │ │ ├── Instruments.ipynb │ │ │ │ └── Measures.ipynb │ │ │ ├── 01_scenarios_and_contexts/ │ │ │ │ ├── examples/ │ │ │ │ │ ├── 00_market_objects/ │ │ │ │ │ │ ├── 010000_market_data_in_gs_quant.ipynb │ │ │ │ │ │ ├── 010001_market_objects.ipynb │ │ │ │ │ │ ├── 010002_marketdatapattern_basics.ipynb │ │ │ │ │ │ ├── 010003_marketdatapattern_construction_ir.ipynb │ │ │ │ │ │ ├── 010004_marketdatapattern_construction_ir_vol.ipynb │ │ │ │ │ │ ├── 010005_marketdatapattern_construction_ir_basis.ipynb │ │ │ │ │ │ ├── 010006_marketdatapattern_construction_ir_xc.ipynb │ │ │ │ │ │ ├── 010007_marketdatapattern_construction_fx.ipynb │ │ │ │ │ │ ├── 010008_marketdatapattern_construction_fx_fwd.ipynb │ │ │ │ │ │ ├── 010009_marketdatapattern_construction_fx_vol.ipynb │ │ │ │ │ │ └── 010010_marketdatapattern_construction_cd.ipynb │ │ │ │ │ ├── 01_rollfwd_shock/ │ │ │ │ │ │ ├── 01_rollfwd_for_trade.ipynb │ │ │ │ │ │ ├── 02_basic_use_of_rollfwd_scenario.ipynb │ │ │ │ │ │ ├── 03_rollfwd-showing-lifecycling-effects-on-swaps-and-swaptions.ipynb │ │ │ │ │ │ ├── 04_yield_curves_with_rollfwd.ipynb │ │ │ │ │ │ └── 05_rollfwd_swap_fwd_rates.ipynb │ │ │ │ │ ├── 02_market_shock/ │ │ │ │ │ │ ├── 010200_marketdatashockbasedscenario_basics.ipynb │ │ │ │ │ │ ├── 010201_rate_spot_shock.ipynb │ │ │ │ │ │ ├── 010202_rate_curve_shock.ipynb │ │ │ │ │ │ ├── 010203_rate_vol_shock.ipynb │ │ │ │ │ │ ├── 010204_delta_shock_equivalent.ipynb │ │ │ │ │ │ ├── 010205_vega_shock_equivalent.ipynb │ │ │ │ │ │ ├── 010206_eq_spot_shock.ipynb │ │ │ │ │ │ └── 010207_fx_shock_examples.ipynb │ │ │ │ │ ├── 03_composite_shocks/ │ │ │ │ │ │ ├── 010300_rate_composite_shocks.ipynb │ │ │ │ │ │ └── 010301_multiple_shocks.ipynb │ │ │ │ │ ├── 04_curve_shock/ │ │ │ │ │ │ ├── 010400_parallel_curve_shock.ipynb │ │ │ │ │ │ ├── 010401_curve_shock_midpoint.ipynb │ │ │ │ │ │ ├── 010402_bear_steepener_curve_shock.ipynb │ │ │ │ │ │ ├── 010403_bull_steepener_curve_shock.ipynb │ │ │ │ │ │ ├── 010404_bear_flattener_curve_shock.ipynb │ │ │ │ │ │ └── 010405_bull_flattener_curve_shock.ipynb │ │ │ │ │ ├── 05_market_override/ │ │ │ │ │ │ ├── 010501_eq_spot_override.ipynb │ │ │ │ │ │ └── 010502_eq_future_override.ipynb │ │ │ │ │ ├── 06_vol_market_override/ │ │ │ │ │ │ ├── 010601_eq_vol_override_eod.ipynb │ │ │ │ │ │ └── 010601_eq_vol_override_intraday.ipynb │ │ │ │ │ ├── 07_curve_overlay/ │ │ │ │ │ │ ├── 010700_discount_curve_overlay.ipynb │ │ │ │ │ │ └── CurveExample.csv │ │ │ │ │ ├── 08_multi_scenario/ │ │ │ │ │ │ └── 010801_multi_scenario_shock.ipynb │ │ │ │ │ └── 09_measure_scenario/ │ │ │ │ │ ├── 010901_fx_override_example.ipynb │ │ │ │ │ ├── 010902_rates_override_example.ipynb │ │ │ │ │ └── 010903_eq_override_example.ipynb │ │ │ │ └── tutorials/ │ │ │ │ ├── Pricing_Context.ipynb │ │ │ │ └── Scenarios.ipynb │ │ │ └── External Demo v1.ipynb │ │ ├── 03_portfolios/ │ │ │ ├── examples/ │ │ │ │ ├── .ipynb_checkpoints/ │ │ │ │ │ └── 030000_create_portfolio-checkpoint.ipynb │ │ │ │ ├── 030000_create_portfolio.ipynb │ │ │ │ ├── 030001_modify_instruments.ipynb │ │ │ │ ├── 030002_extracting_instruments_and_results.ipynb │ │ │ │ ├── 030003_resolve_portfolio.ipynb │ │ │ │ ├── 030004_price_portfolio.ipynb │ │ │ │ ├── 030005_calculate_portfolio_risk.ipynb │ │ │ │ ├── 030006_portfolio_grid_calc.ipynb │ │ │ │ ├── 030007_pnl_explain.ipynb │ │ │ │ ├── 030008_portflio_from_frame.ipynb │ │ │ │ ├── 030009_portfolio_risk_result_to_frame.ipynb │ │ │ │ ├── 030010_portfolio_intra_leg_dependencies.ipynb │ │ │ │ ├── 030011_portfolio_from_csv.ipynb │ │ │ │ └── my_excel_portfolio.csv │ │ │ └── tutorials/ │ │ │ ├── Create New Portfolio.ipynb │ │ │ ├── Portfolios.ipynb │ │ │ ├── Pull Portfolio Factor Risk Data.ipynb │ │ │ ├── Pull Portfolio Performance Data.ipynb │ │ │ ├── Pull Portfolio Risk Data.ipynb │ │ │ └── Update Historical Portfolio.ipynb │ │ ├── 04_backtesting/ │ │ │ ├── examples/ │ │ │ │ ├── 01_PredefinedAssetEngine/ │ │ │ │ │ └── 040100_simple_example.ipynb │ │ │ │ ├── 02_EquityVolEngine/ │ │ │ │ │ ├── 040200_strategy_simple.ipynb │ │ │ │ │ ├── 040201_strategy_delta_hedged.ipynb │ │ │ │ │ ├── 040202_strategy_pnl_decomposition.ipynb │ │ │ │ │ ├── 040203_strategy_with_signals.ipynb │ │ │ │ │ ├── 040204_strategy_market_model.ipynb │ │ │ │ │ └── 040205_strategy_scaled_add_action.ipynb │ │ │ │ └── 03_GenericEngine/ │ │ │ │ ├── 040300_strategy_periodic_trigger.ipynb │ │ │ │ ├── 040301_strategy_risk_trigger.ipynb │ │ │ │ ├── 040302_strategy_delta_hedge_FX.ipynb │ │ │ │ ├── 040303_strategy_delta_hedge_Rates.ipynb │ │ │ │ ├── 040304_strategy_mean_reversion.ipynb │ │ │ │ ├── 040305_strategy_exit_trade_action.ipynb │ │ │ │ ├── 040306_strategy_mkt_trigger.ipynb │ │ │ │ ├── 040307_strategy_seagull_bullish.ipynb │ │ │ │ ├── 040308_rebalance_action.ipynb │ │ │ │ ├── 040309_inflation_hedging_strategy.ipynb │ │ │ │ ├── 040310_initial_swap_hedging_strategy_varying_CSA.ipynb │ │ │ │ ├── 040311_handling_holidays.ipynb │ │ │ │ ├── 040312_strategy_scaled_add_action.ipynb │ │ │ │ ├── 040313_chained_actions.ipynb │ │ │ │ └── 040314_gradual_entries.ipynb │ │ │ └── tutorials/ │ │ │ ├── Backtesting.ipynb │ │ │ └── Basic backtest walkthrough.ipynb │ │ ├── 05_factor_models/ │ │ │ ├── 01_Factor_Models.ipynb │ │ │ └── 02_Upload_Factor_Models.ipynb │ │ ├── 06_baskets/ │ │ │ ├── examples/ │ │ │ │ ├── 01_basket_composition_data/ │ │ │ │ │ ├── 0000_get_latest_basket_composition.ipynb │ │ │ │ │ ├── 0001_get_basket_composition_for_date.ipynb │ │ │ │ │ ├── 0002_get_basket_composition_for_date_range.ipynb │ │ │ │ │ ├── 0003_get_full_basket_composition_history.ipynb │ │ │ │ │ ├── 0004_get_basket_composition_dates.ipynb │ │ │ │ │ └── 0005_get_basket_composition_dataset_coverage.ipynb │ │ │ │ ├── 02_basket_pricing_data/ │ │ │ │ │ ├── 0000_get_latest_basket_close_price.ipynb │ │ │ │ │ ├── 0001_get_basket_close_price_for_date.ipynb │ │ │ │ │ ├── 0002_get_basket_close_price_for_dates.ipynb │ │ │ │ │ └── 0003_get_full_basket_close_price_history.ipynb │ │ │ │ ├── 03_basket_creation/ │ │ │ │ │ ├── 0000_clone_basket_position_set.ipynb │ │ │ │ │ └── position_set/ │ │ │ │ │ ├── 0000_create_position_set_using_position_weights.ipynb │ │ │ │ │ ├── 0001_create_position_set_using_position_quantities.ipynb │ │ │ │ │ ├── 0002_create_position_set_of_equal_weight_from_list_of_identifiers.ipynb │ │ │ │ │ ├── 0003_equalize_position_set_weights.ipynb │ │ │ │ │ ├── 0004_add_position_to_existing_position_set.ipynb │ │ │ │ │ ├── 0005_create_position_set_from_list_of_dictionaries.ipynb │ │ │ │ │ ├── 0006_create_position_set_from_dataframe.ipynb │ │ │ │ │ ├── 0007_create_position_set_from_csv.ipynb │ │ │ │ │ ├── 0008_create_position_set_from_excel.ipynb │ │ │ │ │ ├── 0009_fetch_position_quantities_from_weights.ipynb │ │ │ │ │ ├── 0010_fetch_position_weights_from_quantities.ipynb │ │ │ │ │ ├── 0011_redistribute_position_weights.ipynb │ │ │ │ │ └── 0012_create_historical_position_sets_from_excel.ipynb │ │ │ │ ├── 04_basket_corporate_actions_data/ │ │ │ │ │ ├── 0000_get_full_basket_corporate_actions_history.ipynb │ │ │ │ │ ├── 0001_get_basket_corporate_actions_for_dates.ipynb │ │ │ │ │ ├── 0002_get_basket_upcoming_corporate_actions.ipynb │ │ │ │ │ └── 0003_get_specific_corporate_actions_types.ipynb │ │ │ │ ├── 05_basket_fundamentals_data/ │ │ │ │ │ ├── 0000_get_basket_fundamentals_history.ipynb │ │ │ │ │ ├── 0001_get_basket_fundamentals_for_dates.ipynb │ │ │ │ │ ├── 0001_get_basket_fundamentals_specific_period_and_direction.ipynb │ │ │ │ │ ├── 0002_get_basket_fundamentals_for_date_range.ipynb │ │ │ │ │ ├── 0002_get_basket_fundamentals_specific_period_and_direction.ipynb │ │ │ │ │ └── 0003_get_specific_basket_fundamentals_metrics.ipynb │ │ │ │ ├── 06_basket_reports/ │ │ │ │ │ ├── 0000_create_new_factor_risk_report.ipynb │ │ │ │ │ ├── 0001_delete_existing_factor_risk_report.ipynb │ │ │ │ │ ├── 0002_get_existing_factor_risk_report.ipynb │ │ │ │ │ ├── 0003_get_all_existing_basket_reports.ipynb │ │ │ │ │ ├── 0004_get_status_of_all_existing_basket_reports.ipynb │ │ │ │ │ ├── 0005_poll_status_of_most_recent_basket_create_report.ipynb │ │ │ │ │ └── 0006_poll_report_status_using_report_id.ipynb │ │ │ │ ├── 07_basket_permissions/ │ │ │ │ │ ├── 0000_get_basket_permissions.ipynb │ │ │ │ │ ├── 0001_permission_application_to_basket.ipynb │ │ │ │ │ ├── 0002_permission_user_to_basket_by_email.ipynb │ │ │ │ │ ├── 0003_permission_group_to_basket.ipynb │ │ │ │ │ ├── 0004_remove_basket_permissions.ipynb │ │ │ │ │ └── 0005_get_your_permissioned_baskets.ipynb │ │ │ │ └── 08_flagship_baskets/ │ │ │ │ ├── 0000_get_flagship_baskets.ipynb │ │ │ │ ├── 0001_get_flagship_baskets_on_date.ipynb │ │ │ │ ├── 0002_get_flagship_baskets_containing_assets.ipynb │ │ │ │ ├── 0003_get_flagship_baskets_containing_assets_on_date.ipynb │ │ │ │ ├── 0004_get_flagship_baskets_prices.ipynb │ │ │ │ ├── 0005_get_flagship_baskets_prices_for_date_range.ipynb │ │ │ │ ├── 0006_get_flagship_baskets_compositions.ipynb │ │ │ │ ├── 0007_get_flagship_baskets_compositions_for_date_range.ipynb │ │ │ │ ├── 0008_filter_flagship_baskets_by_basket_type.ipynb │ │ │ │ ├── 0009_filter_flagship_baskets_by_region.ipynb │ │ │ │ ├── 0010_filter_flagship_baskets_by_styles.ipynb │ │ │ │ └── 0011_filter_flagship_baskets_by_ticker.ipynb │ │ │ └── tutorials/ │ │ │ ├── Basket Backcast.ipynb │ │ │ ├── Basket Create.ipynb │ │ │ ├── Basket Edit.ipynb │ │ │ └── Basket Rebalance.ipynb │ │ ├── 07_index/ │ │ │ ├── README.md │ │ │ ├── examples/ │ │ │ │ ├── 0000_get_index_Marquee_url.ipynb │ │ │ │ ├── 0001_get_index_close_prices.ipynb │ │ │ │ ├── 0002_get_index_fundamentals_data.ipynb │ │ │ │ ├── 0003_get_index_constituents.ipynb │ │ │ │ ├── 0004_get_index_weights_and_attribution.ipynb │ │ │ │ └── 0005_get_index_as_a_tree.ipynb │ │ │ └── tutorials/ │ │ │ └── GS Quant STS Index Tutorial.ipynb │ │ ├── 08_tree_entity/ │ │ │ └── tree_entity.ipynb │ │ ├── 09_security_master/ │ │ │ ├── Security Master SDK.ipynb │ │ │ └── Security Master.ipynb │ │ ├── 10_one_delta/ │ │ │ ├── Hedger/ │ │ │ │ ├── 01_Performance_Hedger.ipynb │ │ │ │ ├── 02_Factor_Hedger_(Axioma_Portfolio_Optimizer).ipynb │ │ │ │ └── 03_Continuous_Optimization.ipynb │ │ │ ├── Portfolios/ │ │ │ │ ├── 01_Create_Backcasted_Portfolio.ipynb │ │ │ │ ├── 02_Create_New_Historical_Portfolio.ipynb │ │ │ │ ├── 03_Update_Historical_Portfolio.ipynb │ │ │ │ ├── 04_Get_Factor_Attribution_Data.ipynb │ │ │ │ ├── 05_Manage_a_Fund_of_Funds.ipynb │ │ │ │ ├── 06_Get_Factor_Risk_Data.ipynb │ │ │ │ ├── 07_Get_Portfolio_Performance_Analytics.ipynb │ │ │ │ ├── 08_Get_ESG_Analytics.ipynb │ │ │ │ ├── 09_Get_Carbon_Analytics.ipynb │ │ │ │ └── 10_Get_Thematic_Analytics.ipynb │ │ │ └── Reports/ │ │ │ ├── 01_Factor_Risk_Report.ipynb │ │ │ ├── 02_Performance_Report.ipynb │ │ │ └── 03_Thematic_Report.ipynb │ │ ├── 11_macro_models/ │ │ │ ├── 01_Query_Macro_Models.ipynb │ │ │ └── 02_Upload_Macro_Models.ipynb │ │ ├── 12_scenarios/ │ │ │ ├── 01_Custom_Factor_Shocks.ipynb │ │ │ └── 02_Historical_Scenarios.ipynb │ │ ├── Contents.ipynb │ │ ├── Index.ipynb │ │ ├── README.md │ │ └── git │ ├── entities/ │ │ ├── __init__.py │ │ ├── entitlements.py │ │ ├── entity.py │ │ ├── entity_utils.py │ │ └── tree_entity.py │ ├── errors.py │ ├── instrument/ │ │ ├── __init__.py │ │ ├── core.py │ │ └── overrides.py │ ├── interfaces/ │ │ ├── __init__.py │ │ └── algebra.py │ ├── json_convertors.py │ ├── json_convertors_common.py │ ├── json_encoder.py │ ├── markets/ │ │ ├── __init__.py │ │ ├── baskets.py │ │ ├── core.py │ │ ├── factor.py │ │ ├── factor_analytics.py │ │ ├── hedge.py │ │ ├── historical.py │ │ ├── index.py │ │ ├── indices_utils.py │ │ ├── markets.py │ │ ├── optimizer.py │ │ ├── portfolio.py │ │ ├── portfolio_manager.py │ │ ├── portfolio_manager_utils.py │ │ ├── position_set.py │ │ ├── position_set_utils.py │ │ ├── report.py │ │ ├── report_utils.py │ │ ├── scenario.py │ │ ├── screens.py │ │ └── securities.py │ ├── models/ │ │ ├── __init__.py │ │ ├── epidemiology.py │ │ ├── risk_model.py │ │ └── risk_model_utils.py │ ├── priceable.py │ ├── quote_reports/ │ │ ├── __init__.py │ │ └── core.py │ ├── risk/ │ │ ├── __init__.py │ │ ├── core.py │ │ ├── measures.py │ │ ├── result_handlers.py │ │ ├── results.py │ │ ├── scenario_utils.py │ │ ├── scenarios.py │ │ └── transform.py │ ├── session.py │ ├── target/ │ │ ├── __init__.py │ │ ├── assets.py │ │ ├── assets_screener.py │ │ ├── backtests.py │ │ ├── base_screener.py │ │ ├── charts.py │ │ ├── common.py │ │ ├── content.py │ │ ├── coordinates.py │ │ ├── countries.py │ │ ├── data.py │ │ ├── data_screen.py │ │ ├── groups.py │ │ ├── hedge.py │ │ ├── indices.py │ │ ├── instrument.py │ │ ├── measures.py │ │ ├── monitor.py │ │ ├── portfolios.py │ │ ├── positions_v2_pricing.py │ │ ├── price.py │ │ ├── reports.py │ │ ├── risk.py │ │ ├── risk_models.py │ │ ├── scenarios.py │ │ ├── screens.py │ │ ├── secmaster.py │ │ ├── trades.py │ │ ├── workflow_quote.py │ │ └── workspaces_markets.py │ ├── test/ │ │ ├── __init__.py │ │ ├── analytics/ │ │ │ ├── __init__.py │ │ │ ├── test_datagrid.py │ │ │ ├── test_sorting_and_filtering.py │ │ │ └── test_workspace.py │ │ ├── api/ │ │ │ ├── __init__.py │ │ │ ├── backtests_xasset/ │ │ │ │ ├── __init__.py │ │ │ │ ├── json_encoders/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── response_datatypes/ │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── test_risk_result_datatype_encoders.py │ │ │ │ │ │ └── test_risk_result_encoders.py │ │ │ │ │ ├── test_request_encoders.py │ │ │ │ │ └── test_response_encoders.py │ │ │ │ ├── response_datatypes/ │ │ │ │ │ ├── test_backtest_datatypes.py │ │ │ │ │ ├── test_risk_result.py │ │ │ │ │ └── test_risk_result_datatypes.py │ │ │ │ ├── test_request.py │ │ │ │ └── test_response.py │ │ │ ├── test_assets.py │ │ │ ├── test_backtests.py │ │ │ ├── test_base_screener.py │ │ │ ├── test_cache.py │ │ │ ├── test_carbon.py │ │ │ ├── test_content.py │ │ │ ├── test_data.py │ │ │ ├── test_data_screen.py │ │ │ ├── test_esg.py │ │ │ ├── test_fred.py │ │ │ ├── test_groups.py │ │ │ ├── test_index.py │ │ │ ├── test_instruments.py │ │ │ ├── test_json.py │ │ │ ├── test_monitor.py │ │ │ ├── test_portfolios.py │ │ │ ├── test_reports.py │ │ │ ├── test_risk.py │ │ │ ├── test_risk_models.py │ │ │ ├── test_scenarios.py │ │ │ ├── test_target.py │ │ │ ├── test_thread_manager.py │ │ │ └── test_users.py │ │ ├── backtest/ │ │ │ ├── __init__.py │ │ │ ├── test_backtest_eq_vol_engine.py │ │ │ ├── test_backtest_flow_vol.py │ │ │ ├── test_backtest_predefined.py │ │ │ ├── test_generic_engine.py │ │ │ └── test_triggers.py │ │ ├── calc_cache/ │ │ │ ├── request00e305681f1f021b52ef57f22d4975f1.json │ │ │ ├── request02db37fadb8c59eb98457c277883b4af.json │ │ │ ├── request03cc64abac61cde741b4b5bf90fc3b0f.json │ │ │ ├── request04e5386077a564977740976627ab683d.json │ │ │ ├── request093e1ad35f25cb43fcad999f9adf8c50.json │ │ │ ├── request0b8e0fc36f0a438251dafabc0b82b1a7.json │ │ │ ├── request0c583177f98e8c0c7dba07ae2674c05a.json │ │ │ ├── request0f156bd153459340c4bdb832aa95a1d0.json │ │ │ ├── request102fef2814650c2f6ab945bb5f3cee73.json │ │ │ ├── request12e470a54f4aa7c362e1014136a5d35d.json │ │ │ ├── request14c45549336e6d4b159e517b21517d18.json │ │ │ ├── request159fa95af878447538185c20cedbd92c.json │ │ │ ├── request16d7d8f484a35cf5804f799fc6592d0b.json │ │ │ ├── request18e1caaae1f91d18c754005f495ade4a.json │ │ │ ├── request1bddc8fc32ddb8342e4bc48029eeddf1.json │ │ │ ├── request1c86709bb6a5113c228f95eba201756c.json │ │ │ ├── request1ce838a52895a8e0f92d5bb55bd34a39.json │ │ │ ├── request1d4539a3acd22c90869eab6aa89349e3.json │ │ │ ├── request21cb074ade64e87b2f347dcb5f3e1ca0.json │ │ │ ├── request2799d7b0273add0629fbc071aefb6009.json │ │ │ ├── request27dad63f70c50190d762787d5415fb1f.json │ │ │ ├── request286b0ac010bfdb78f33dfd318679886a.json │ │ │ ├── request2a045cde3970ab7b348df05e95e7b9c3.json │ │ │ ├── request2cf5ebd3b922341e1de6d9831f8f6c79.json │ │ │ ├── request2d4fd08fb9b3dcc46d38954586f8cab3.json │ │ │ ├── request2f3646d722cf8712bd4a452a2768482f.json │ │ │ ├── request363421aeeef6464692365989d32bb4f9.json │ │ │ ├── request36fb828c98daf78a60a1d02431710592.json │ │ │ ├── request3a4db3779266fe6fc7e31eead46d9996.json │ │ │ ├── request3ad3d9a8afd809af0b2b00617d46758d.json │ │ │ ├── request3ae2e32d798a86cd2605b23e17e8fb03.json │ │ │ ├── request3b59bb4f49f8e379b9b054736bc6fb94.json │ │ │ ├── request3ce9c60acb3eb164709a3f173c1fa3f2.json │ │ │ ├── request3d02eb9418db9237797173d4f68b4425.json │ │ │ ├── request404a1334920b60ed517c9383e2dcc32c.json │ │ │ ├── request4329d6a92dec3a15646a3298c22755b0.json │ │ │ ├── request43642a3bd1d558d1e0a4197c502075f5.json │ │ │ ├── request443b19a6e8283a3bb5063918acfa3d6f.json │ │ │ ├── request44b307c6f73d7e32328511a4bca9361f.json │ │ │ ├── request456dd772d92da1c02ed5ca0d1b3400f9.json │ │ │ ├── request46ded08f0698a95e461efdd890e29421.json │ │ │ ├── request472fd6073bc51283417f418843277e18.json │ │ │ ├── request4a0c2426dcbba307e6747466921d0ebb.json │ │ │ ├── request4be739b5768d699cb118e94e9c73a7d6.json │ │ │ ├── request4cc7e77d411ee5d32b4b68c559fd24eb.json │ │ │ ├── request4d50dbaed5c59d9f8ed4b824a5fa7b4c.json │ │ │ ├── request4e071d86397b95a0b0ad52aebb6b2e03.json │ │ │ ├── request4fbbe5f6fe580bd5e55bbd60e8302c07.json │ │ │ ├── request5010511210568f2494e7d715ddca3fe5.json │ │ │ ├── request535b30f63a7e89e8fa2e17fff4a92b2f.json │ │ │ ├── request53ced6371873432280aa8489c1b45f21.json │ │ │ ├── request5678213359b65da6a1851eeaa706ff24.json │ │ │ ├── request5711e73d9fdfbee2d67781cd43875f26.json │ │ │ ├── request58c9a938f95c4444a0923d7c4b80aedf.json │ │ │ ├── request5961d985671cd44ae28d46079a078af2.json │ │ │ ├── request5c61457b1908e376ae7737adc2e3b19c.json │ │ │ ├── request5d16500482e406ca27c4d57713fe3058.json │ │ │ ├── request5dd997fbddd11bb0c5408ddd86b647d1.json │ │ │ ├── request6314f68c62d451df39cff28d0105f250.json │ │ │ ├── request659985875ffd9309df838437a1a2763b.json │ │ │ ├── request65dc6b58f9c22777f12c1d2971b23523.json │ │ │ ├── request65e287923a4ebf427e6a646c99e200ca.json │ │ │ ├── request66b092215599bb11f8a03a3ff6a4eb3a.json │ │ │ ├── request678cb7e6ab71f2441e6c2f5a917d37be.json │ │ │ ├── request6942e2686a9fe4a5d47af94a897be7e6.json │ │ │ ├── request6a14f7b7044f04669b2c08775f555232.json │ │ │ ├── request6a7213dc0f42bdb7d52e861ee1ec6fc6.json │ │ │ ├── request6b1d7d732da252ae69acdc3a3c2f6eee.json │ │ │ ├── request6c6a6e62e91685350853b59ec792b962.json │ │ │ ├── request6d08be7030b4cb7b9037efcdeb81972a.json │ │ │ ├── request6d7cd2a1c692ce0886cdee9506101e89.json │ │ │ ├── request6eb85d48e09f538f150400127fd73054.json │ │ │ ├── request6efd87b3691c5bc5d90f6e638748dc98.json │ │ │ ├── request6f8d6b283e5fe8b79e66975b2ed587a7.json │ │ │ ├── request70a863d464f50abba7a86e6d46cb2873.json │ │ │ ├── request717adad42d5d576152b1f6d809a3c8da.json │ │ │ ├── request73d0ff7060259d01f1bdbbd7acda5686.json │ │ │ ├── request77e65ffbd857c39cf14a9ad74279c7ba.json │ │ │ ├── request7833cccde5be44847d2834c320efac2b.json │ │ │ ├── request78dbb0af61a1e23a0f2614eb98bb46c0.json │ │ │ ├── request78ee70188fa3e6dce58e75f8df9a701f.json │ │ │ ├── request7c05dd05540a5377e1487ef4f0c54c48.json │ │ │ ├── request7c0ed6f293c87c377c58c8d911aaa777.json │ │ │ ├── request7dde687744f571fd6650ad7399203ac5.json │ │ │ ├── request816449d2d775bc083cf300974bdc10af.json │ │ │ ├── request85a1eff8ed194c127249a682db2d27cf.json │ │ │ ├── request878bab10c211dd44cb4553f6dc484f83.json │ │ │ ├── request895686a32c6921f666fe79c10493bb1f.json │ │ │ ├── request8ac2bf9b09cc9383988a934fe691692a.json │ │ │ ├── request8b7a3ed64b4a972e90f48ad347670813.json │ │ │ ├── request8bc8f9c4da52c90d51b3e18e1300c6d4.json │ │ │ ├── request8bfa8a8950c0bdfc209c49e531739006.json │ │ │ ├── request8d2c2ca8df0fc30cb3152076a8af6016.json │ │ │ ├── request90eccd55b0448292d8511e73985542d7.json │ │ │ ├── request914b625be8999c92f5b0fb21cb5c39f4.json │ │ │ ├── request91c941704f6cfc578724277dbb79d456.json │ │ │ ├── request9228e718c64b256d661a1d93909708c7.json │ │ │ ├── request9484a9be138ecb74c7241db00fd05dcd.json │ │ │ ├── request95d170fa02a120482c2f0497c72d5716.json │ │ │ ├── request9a319113c6ca13dad7540c7fd90825ba.json │ │ │ ├── request9da53bdb54ed741dd7b73e22896e610a.json │ │ │ ├── requesta3af76c3bf560d090aeb79bc6cdde208.json │ │ │ ├── requesta473c17920ab76f366755aa775da6371.json │ │ │ ├── requesta58fc4bd517e4a3f1a277f68287609f3.json │ │ │ ├── requesta5eb6cf7f7a7e728b9137396b59150b0.json │ │ │ ├── requestaa5e55819e3a43cca2b284c2119e7525.json │ │ │ ├── requestaaedaa96766d75c664e8b3898af8365e.json │ │ │ ├── requestad0c6bd76338f1bf498b16070275d04b.json │ │ │ ├── requestaf28694ceb9c1d15492c7700c07306e6.json │ │ │ ├── requestb0b099f6cc16db5524cb336b6373371e.json │ │ │ ├── requestb0b66e7402bd021f6f6f81f69bf9ef18.json │ │ │ ├── requestb112a918a2ece9a875d1c8d0856e1e68.json │ │ │ ├── requestb2ea00c2300d04ad523903f37a562dff.json │ │ │ ├── requestb417b5930a480b4bb07a2793b782c32d.json │ │ │ ├── requestb90286425e6ad1f5a3e66eb9bfc5b528.json │ │ │ ├── requestba369474db70c4ca2f99d1236c773532.json │ │ │ ├── requestbac6a90eed6358050cc451b7346dbae5.json │ │ │ ├── requestbb865103df394a5176b211859dfca415.json │ │ │ ├── requestc236b51cddef2fe8297064984e04c805.json │ │ │ ├── requestc39de7d52670682c117b785d51c8b4a6.json │ │ │ ├── requestc61016e904bc4d53f10bf8a9d42b7c84.json │ │ │ ├── requestc61cdb727bd2ab602ece911831deb892.json │ │ │ ├── requestc64a55ad8b16703d13479ff3b11b70ec.json │ │ │ ├── requestc9114e54aa19a8b53536ffee44a47797.json │ │ │ ├── requestc9537f6814eae8f18ee5fc96495e50bb.json │ │ │ ├── requestca27b0fb75992d8bbf6e9c9f6f84ba73.json │ │ │ ├── requestcb0e3c415937bb510a07119d29d30f6c.json │ │ │ ├── requestcb5f0c0bf31052204b28b68fd4464ac2.json │ │ │ ├── requestcc779554821681f119c9f516e46e3572.json │ │ │ ├── requestcce834252e64fa6189dbf804832284d6.json │ │ │ ├── requestcea65b205ad7e24117413111443a5d21.json │ │ │ ├── requestcf7ff46417f372533eec9ff30e85e53a.json │ │ │ ├── requestcfd7a039b31a326a7f59903d43a0d82f.json │ │ │ ├── requestd5a11b24c7329de1b599df1a3e5dd3a5.json │ │ │ ├── requestd985fa8d172480fdad5e1d2593ad8bac.json │ │ │ ├── requestd9f1692ebd3ee6eeae81298c1e555c97.json │ │ │ ├── requestdafae46704002ad2c1a2e8bc9a8f6bd4.json │ │ │ ├── requestdb4285900a117c954874542ae9a61712.json │ │ │ ├── requestdba69f5aa7819199c2345b2e872bf817.json │ │ │ ├── requeste0b867518c8f5765d221460aa462b9a1.json │ │ │ ├── requeste0d1a0fc88ab2155bafe544f85f751bd.json │ │ │ ├── requeste114a9f5fd19a44b1ec99394536dd4e9.json │ │ │ ├── requeste335e05ef6904adc1c56772fef5b92c1.json │ │ │ ├── requeste6809f076a1e32621a6124e017302856.json │ │ │ ├── requeste6d7f90423e2ce1c3be3b513f67aed72.json │ │ │ ├── requestf097e66ab00cfd403830fe9718723934.json │ │ │ ├── requestf1a8064322aba584bed2936c03ef96e7.json │ │ │ ├── requestf3acb9755ef5e82153b1ee6c24deff72.json │ │ │ ├── requestf48c727eb8f636d8d5aec677e3379e98.json │ │ │ ├── requestf58b3a2ad19557b466036841eb110ff0.json │ │ │ ├── requestf6793717b5017cc15a746e90ce585cc3.json │ │ │ ├── requestfa39f59c007048d21f5fcebb516a55c3.json │ │ │ ├── requestfaea73719549e6087d5398b07d322976.json │ │ │ ├── requestfb80e8b3c71c17a77857b7df855d5b7c.json │ │ │ └── requestfce828ba2ccac19204c1194026c7390c.json │ │ ├── config/ │ │ │ └── test_options.py │ │ ├── data/ │ │ │ ├── __init__.py │ │ │ ├── test_data_caching.py │ │ │ ├── test_data_coordinate.py │ │ │ ├── test_dataset.py │ │ │ └── test_query.py │ │ ├── datetime_/ │ │ │ ├── __init__.py │ │ │ ├── test_date.py │ │ │ ├── test_gscalendar.py │ │ │ ├── test_point.py │ │ │ ├── test_relative_date.py │ │ │ └── test_time.py │ │ ├── entities/ │ │ │ ├── test_entitlements.py │ │ │ ├── test_group.py │ │ │ └── test_user.py │ │ ├── fixtures/ │ │ │ ├── __init__.py │ │ │ └── content.py │ │ ├── markets/ │ │ │ ├── __init__.py │ │ │ ├── test_baskets.py │ │ │ ├── test_close_market.py │ │ │ ├── test_hedger.py │ │ │ ├── test_instrument.py │ │ │ ├── test_portfolio.py │ │ │ ├── test_portfolio_manager.py │ │ │ ├── test_position_set.py │ │ │ ├── test_pricing_context.py │ │ │ ├── test_report.py │ │ │ ├── test_scenarios.py │ │ │ └── test_securities.py │ │ ├── mock_data_test_utils.py │ │ ├── models/ │ │ │ ├── __init__.py │ │ │ ├── test_epidemiology.py │ │ │ ├── test_risk_model.py │ │ │ └── test_risk_model_utils.py │ │ ├── resources/ │ │ │ ├── MA4B66MW5E27U8P32SB-xrefs.json │ │ │ ├── MA4B66MW5E27U8P32SB.json │ │ │ ├── MA4J1YB8XZP2BPT8-xrefs.json │ │ │ ├── MA4J1YB8XZP2BPT8.json │ │ │ ├── MA66CZBQJST05XKG-xrefs.json │ │ │ ├── MA66CZBQJST05XKG.json │ │ │ ├── MAJ6SEQH3GT0GA2Z-xrefs.json │ │ │ ├── MAJ6SEQH3GT0GA2Z.json │ │ │ ├── MAJNQPFGN1EBDHAE-xrefs.json │ │ │ ├── MAJNQPFGN1EBDHAE.json │ │ │ ├── MAK1FHKH5P5GJSHH-xrefs.json │ │ │ ├── MAK1FHKH5P5GJSHH.json │ │ │ ├── MARCRZHY163GQ4H3.json │ │ │ ├── MASGTFZYNA7PMQ3H.json │ │ │ ├── MATGYV0J9MPX534Z-xrefs.json │ │ │ ├── MATGYV0J9MPX534Z.json │ │ │ ├── MAYJPCVVF2RWXCES-xrefs.json │ │ │ ├── MAYJPCVVF2RWXCES.json │ │ │ ├── MAZ7RWC904JYHYPS-xrefs.json │ │ │ ├── MAZ7RWC904JYHYPS.json │ │ │ ├── MIDASER_SPX_USD.csv │ │ │ ├── SPX_50_icorr_in.csv │ │ │ ├── SPX_50_icorr_out.csv │ │ │ ├── SPX_50_rcorr_in.csv │ │ │ ├── SPX_50_rcorr_out.csv │ │ │ ├── SPX_50_weights.csv │ │ │ ├── Sharpe_SPX_0175.csv │ │ │ ├── asset-query-USDJPY.json │ │ │ ├── nobbid-xrefs.json │ │ │ └── nobbid.json │ │ ├── risk/ │ │ │ ├── test_measures.py │ │ │ └── test_results.py │ │ ├── test_base.py │ │ ├── test_session.py │ │ ├── timeseries/ │ │ │ ├── __init__.py │ │ │ ├── multi_measure/ │ │ │ │ ├── __init__.py │ │ │ │ ├── test_commod.py │ │ │ │ └── test_measure_registry.py │ │ │ ├── test_algebra.py │ │ │ ├── test_analysis.py │ │ │ ├── test_backtesting.py │ │ │ ├── test_datetime.py │ │ │ ├── test_econometrics.py │ │ │ ├── test_helper.py │ │ │ ├── test_measures.py │ │ │ ├── test_measures_countries.py │ │ │ ├── test_measures_factset.py │ │ │ ├── test_measures_fx_vol.py │ │ │ ├── test_measures_inflation.py │ │ │ ├── test_measures_portfolios.py │ │ │ ├── test_measures_rates.py │ │ │ ├── test_measures_reports.py │ │ │ ├── test_measures_risk_models.py │ │ │ ├── test_measures_xccy.py │ │ │ ├── test_rolling.py │ │ │ ├── test_statistics.py │ │ │ ├── test_tca.py │ │ │ ├── test_technicals.py │ │ │ ├── test_timeseries.py │ │ │ └── utils.py │ │ ├── tracing/ │ │ │ ├── __init__.py │ │ │ └── test_tracing.py │ │ └── utils/ │ │ ├── __init__.py │ │ ├── datagrid_test_utils.py │ │ ├── mock_calc.py │ │ ├── mock_data.py │ │ ├── mock_request.py │ │ ├── test_utilities.py │ │ └── test_utils.py │ ├── timeseries/ │ │ ├── __init__.py │ │ ├── algebra.py │ │ ├── analysis.py │ │ ├── backtesting.py │ │ ├── datetime.py │ │ ├── econometrics.py │ │ ├── helper.py │ │ ├── measure_registry.py │ │ ├── measures.py │ │ ├── measures_countries.py │ │ ├── measures_factset.py │ │ ├── measures_fx_vol.py │ │ ├── measures_helper.py │ │ ├── measures_inflation.py │ │ ├── measures_portfolios.py │ │ ├── measures_rates.py │ │ ├── measures_reports.py │ │ ├── measures_risk_models.py │ │ ├── measures_xccy.py │ │ ├── statistics.py │ │ ├── tca.py │ │ └── technicals.py │ ├── tracing/ │ │ ├── __init__.py │ │ └── tracing.py │ └── workflow/ │ ├── __init__.py │ └── workflow.py ├── pyproject.toml ├── requirements.txt ├── setup.cfg ├── setup.py └── versioneer.py
Showing preview only (532K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (6620 symbols across 316 files)
FILE: docs/_build/html/_static/doctools.js
function highlight (line 69) | function highlight(node, addItems) {
FILE: docs/_build/html/_static/jquery-3.5.1.js
function DOMEval (line 103) | function DOMEval( code, node, doc ) {
function toType (line 133) | function toType( obj ) {
function isArrayLike (line 503) | function isArrayLike( obj ) {
function Sizzle (line 755) | function Sizzle( selector, context, results, seed ) {
function createCache (line 903) | function createCache() {
function markFunction (line 923) | function markFunction( fn ) {
function assert (line 932) | function assert( fn ) {
function addHandle (line 956) | function addHandle( attrs, handler ) {
function siblingCheck (line 971) | function siblingCheck( a, b ) {
function createInputPseudo (line 997) | function createInputPseudo( type ) {
function createButtonPseudo (line 1008) | function createButtonPseudo( type ) {
function createDisabledPseudo (line 1019) | function createDisabledPseudo( disabled ) {
function createPositionalPseudo (line 1075) | function createPositionalPseudo( fn ) {
function testContext (line 1098) | function testContext( context ) {
function setFilters (line 2309) | function setFilters() {}
function toSelector (line 2383) | function toSelector( tokens ) {
function addCombinator (line 2393) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 2460) | function elementMatcher( matchers ) {
function multipleContexts (line 2474) | function multipleContexts( selector, contexts, results ) {
function condense (line 2483) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 2504) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 2604) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 2667) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function nodeName (line 3025) | function nodeName( elem, name ) {
function winnow (line 3035) | function winnow( elements, qualifier, not ) {
function sibling (line 3330) | function sibling( cur, dir ) {
function createOptions (line 3423) | function createOptions( options ) {
function Identity (line 3648) | function Identity( v ) {
function Thrower (line 3651) | function Thrower( ex ) {
function adoptValue (line 3655) | function adoptValue( value, resolve, reject, noValue ) {
function resolve (line 3748) | function resolve( depth, deferred, handler, special ) {
function completed (line 4113) | function completed() {
function fcamelCase (line 4208) | function fcamelCase( _all, letter ) {
function camelCase (line 4215) | function camelCase( string ) {
function Data (line 4232) | function Data() {
function getData (line 4401) | function getData( data ) {
function dataAttr (line 4426) | function dataAttr( elem, key, data ) {
function adjustCSS (line 4738) | function adjustCSS( elem, prop, valueParts, tween ) {
function getDefaultDisplay (line 4806) | function getDefaultDisplay( elem ) {
function showHide (line 4829) | function showHide( elements, show ) {
function getAll (line 4961) | function getAll( context, tag ) {
function setGlobalEval (line 4986) | function setGlobalEval( elems, refElements ) {
function buildFragment (line 5002) | function buildFragment( elems, context, scripts, selection, ignored ) {
function returnTrue (line 5097) | function returnTrue() {
function returnFalse (line 5101) | function returnFalse() {
function expectSync (line 5111) | function expectSync( elem, type ) {
function safeActiveElement (line 5118) | function safeActiveElement() {
function on (line 5124) | function on( elem, types, selector, data, fn, one ) {
function leverageNative (line 5612) | function leverageNative( el, type, expectSync ) {
function manipulationTarget (line 5976) | function manipulationTarget( elem, content ) {
function disableScript (line 5987) | function disableScript( elem ) {
function restoreScript (line 5991) | function restoreScript( elem ) {
function cloneCopyEvent (line 6001) | function cloneCopyEvent( src, dest ) {
function fixInput (line 6034) | function fixInput( src, dest ) {
function domManip (line 6047) | function domManip( collection, args, callback, ignored ) {
function remove (line 6139) | function remove( elem, selector, keepData ) {
function computeStyleTests (line 6453) | function computeStyleTests() {
function roundPixelMeasures (line 6497) | function roundPixelMeasures( measure ) {
function curCSS (line 6571) | function curCSS( elem, name, computed ) {
function addGetHookIf (line 6624) | function addGetHookIf( conditionFn, hookFn ) {
function vendorPropName (line 6649) | function vendorPropName( name ) {
function finalPropName (line 6664) | function finalPropName( name ) {
function setPositiveNumber (line 6690) | function setPositiveNumber( _elem, value, subtract ) {
function boxModelAdjustment (line 6702) | function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, ...
function getWidthOrHeight (line 6770) | function getWidthOrHeight( elem, dimension, extra ) {
function Tween (line 7146) | function Tween( elem, options, prop, end, easing ) {
function schedule (line 7269) | function schedule() {
function createFxNow (line 7282) | function createFxNow() {
function genFx (line 7290) | function genFx( type, includeWidth ) {
function createTween (line 7310) | function createTween( value, prop, animation ) {
function defaultPrefilter (line 7324) | function defaultPrefilter( elem, props, opts ) {
function propFilter (line 7496) | function propFilter( props, specialEasing ) {
function Animation (line 7533) | function Animation( elem, properties, options ) {
function stripAndCollapse (line 8248) | function stripAndCollapse( value ) {
function getClass (line 8254) | function getClass( elem ) {
function classesToArray (line 8258) | function classesToArray( value ) {
function buildParams (line 8885) | function buildParams( prefix, obj, traditional, add ) {
function addToPrefiltersOrTransports (line 9039) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 9073) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 9102) | function ajaxExtend( target, src ) {
function ajaxHandleResponses (line 9122) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 9180) | function ajaxConvert( s, response, jqXHR, isSuccess ) {
function done (line 9696) | function done( status, nativeStatusText, responses, headers ) {
FILE: docs/_build/html/_static/jquery.js
function b (line 2) | function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e...
function w (line 2) | function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof...
function p (line 2) | function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e...
function se (line 2) | function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeTy...
function ue (line 2) | function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cac...
function le (line 2) | function le(e){return e[S]=!0,e}
function ce (line 2) | function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(...
function fe (line 2) | function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[...
function pe (line 2) | function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourc...
function de (line 2) | function de(t){return function(e){return"input"===e.nodeName.toLowerCase...
function he (line 2) | function he(n){return function(e){var t=e.nodeName.toLowerCase();return(...
function ge (line 2) | function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e....
function ve (line 2) | function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,...
function ye (line 2) | function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}
function me (line 2) | function me(){}
function xe (line 2) | function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}
function be (line 2) | function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r...
function we (line 2) | function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r-...
function Te (line 2) | function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(...
function Ce (line 2) | function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)...
function Ee (line 2) | function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.r...
function A (line 2) | function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerC...
function D (line 2) | function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,...
function O (line 2) | function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}
function R (line 2) | function R(e){return e}
function M (line 2) | function M(e){throw e}
function I (line 2) | function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n...
function l (line 2) | function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(...
function B (line 2) | function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventLi...
function U (line 2) | function U(e,t){return t.toUpperCase()}
function X (line 2) | function X(e){return e.replace(_,"ms-").replace(z,U)}
function G (line 2) | function G(){this.expando=S.expando+G.uid++}
function Z (line 2) | function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.r...
function se (line 2) | function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:functio...
function le (line 2) | function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[...
function ve (line 2) | function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagNa...
function ye (line 2) | function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",...
function xe (line 2) | function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),...
function Ce (line 2) | function Ce(){return!0}
function Ee (line 2) | function Ee(){return!1}
function Se (line 2) | function Se(e,t){return e===function(){try{return E.activeElement}catch(...
function ke (line 2) | function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"...
function Ae (line 2) | function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handle...
function qe (line 2) | function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"...
function Le (line 2) | function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}
function He (line 2) | function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.sli...
function Oe (line 2) | function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=...
function Pe (line 2) | function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],...
function Re (line 2) | function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)...
function Be (line 2) | function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n....
function $e (line 2) | function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(...
function e (line 2) | function e(){if(l){u.style.cssText="position:absolute;left:-11111px;widt...
function t (line 2) | function t(e){return Math.round(parseFloat(e))}
function Xe (line 2) | function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=fun...
function Je (line 2) | function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[...
function Ke (line 2) | function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border...
function Ze (line 2) | function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-bo...
function et (line 2) | function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}
function st (line 2) | function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnima...
function ut (line 2) | function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}
function lt (line 2) | function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin...
function ct (line 2) | function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["...
function ft (line 2) | function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().alw...
function vt (line 2) | function vt(e){return(e.match(P)||[]).join(" ")}
function yt (line 2) | function yt(e){return e.getAttribute&&e.getAttribute("class")||""}
function mt (line 2) | function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)|...
function Dt (line 2) | function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r|...
function Ft (line 2) | function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var ...
function Bt (line 2) | function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!...
function $t (line 2) | function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)voi...
function l (line 2) | function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=vo...
FILE: docs/_build/html/_static/language_data.js
function splitQuery (line 278) | function splitQuery(query) {
FILE: docs/_build/html/_static/searchtools.js
function splitQuery (line 47) | function splitQuery(query) {
function pulse (line 117) | function pulse() {
function displayNextItem (line 247) | function displayNextItem() {
FILE: docs/_build/html/_static/underscore-1.3.1.js
function eq (line 669) | function eq(a, b, stack) {
FILE: docs/_build/html/_static/underscore.js
function q (line 8) | function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)re...
FILE: docs/_themes/gs/__init__.py
function get_html_theme_path (line 13) | def get_html_theme_path():
function setup (line 20) | def setup(app):
FILE: docs/searchdataext/__init__.py
function setup (line 8) | def setup(app):
class IndexBuilder (line 13) | class IndexBuilder(sphinx.search.IndexBuilder):
method __init__ (line 14) | def __init__(self, env, lang, options, scoring):
method feed (line 19) | def feed(self, docname, filename, title, doctree):
method freeze (line 37) | def freeze(self):
FILE: gs_quant/__init__.py
function get_environment_summary (line 25) | def get_environment_summary():
FILE: gs_quant/_version.py
function get_keywords (line 23) | def get_keywords():
class VersioneerConfig (line 36) | class VersioneerConfig:
function get_config (line 40) | def get_config():
class NotThisMethod (line 54) | class NotThisMethod(Exception):
function register_vcs_handler (line 62) | def register_vcs_handler(vcs, method): # decorator
function run_command (line 73) | def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
function versions_from_parentdir (line 116) | def versions_from_parentdir(parentdir_prefix, root, verbose):
function git_get_keywords (line 141) | def git_get_keywords(versionfile_abs):
function git_versions_from_keywords (line 169) | def git_versions_from_keywords(keywords, tag_prefix, verbose):
function git_pieces_from_vcs (line 233) | def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command):
function plus_or_dot (line 365) | def plus_or_dot(pieces):
function render_pep440 (line 372) | def render_pep440(pieces):
function render_pep440_branch (line 397) | def render_pep440_branch(pieces):
function pep440_split_post (line 427) | def pep440_split_post(ver):
function render_pep440_pre (line 437) | def render_pep440_pre(pieces):
function render_pep440_post (line 461) | def render_pep440_post(pieces):
function render_pep440_post_branch (line 488) | def render_pep440_post_branch(pieces):
function render_pep440_old (line 517) | def render_pep440_old(pieces):
function render_git_describe (line 539) | def render_git_describe(pieces):
function render_git_describe_long (line 559) | def render_git_describe_long(pieces):
function render (line 579) | def render(pieces, style):
function get_versions (line 615) | def get_versions():
FILE: gs_quant/analytics/common/enumerators.py
class ScaleShape (line 20) | class ScaleShape(Enum):
FILE: gs_quant/analytics/common/helpers.py
function is_of_builtin_type (line 28) | def is_of_builtin_type(obj):
function resolve_entities (line 32) | def resolve_entities(reference_list: List[Dict], entity_cache: Dict = No...
function get_rdate_cache_key (line 67) | def get_rdate_cache_key(rule: str, base_date: str, currencies: List[str]...
function get_entity_rdate_key (line 71) | def get_entity_rdate_key(entity_id: str, rule: str, base_date):
function get_entity_rdate_key_from_rdate (line 75) | def get_entity_rdate_key_from_rdate(entity_id: str, rdate: RelativeDate):
FILE: gs_quant/analytics/core/processor.py
class DataQueryInfo (line 65) | class DataQueryInfo:
class MeasureQueryInfo (line 74) | class MeasureQueryInfo:
class BaseProcessor (line 83) | class BaseProcessor(metaclass=ABCMeta):
method __init__ (line 84) | def __init__(self, **kwargs):
method process (line 96) | def process(self, *args):
method post_process (line 100) | def post_process(self):
method __handle_date_range (line 110) | def __handle_date_range(self, result, rdate_entity_map: Dict[str, dt.d...
method update (line 147) | async def update(
method get_plot_expression (line 189) | def get_plot_expression(self):
method __add_required_rdates (line 193) | def __add_required_rdates(self, entity: Entity, rdate_entity_map: Dict...
method build_graph (line 204) | def build_graph(
method calculate (line 256) | async def calculate(
method as_dict (line 287) | def as_dict(self) -> Dict:
method get_default_params (line 355) | def get_default_params(self):
method from_dict (line 363) | def from_dict(cls, obj: Dict, reference_list: List):
FILE: gs_quant/analytics/core/processor_result.py
class ProcessorResult (line 24) | class ProcessorResult:
FILE: gs_quant/analytics/core/query_helpers.py
function aggregate_queries (line 34) | def aggregate_queries(query_infos):
function fetch_query (line 84) | def fetch_query(query_info: Dict):
function build_query_string (line 112) | def build_query_string(dimensions):
function valid_dimensions (line 125) | def valid_dimensions(query_dimensions: Tuple[str, Union[str, float, bool...
FILE: gs_quant/analytics/datagrid/data_cell.py
class DataCell (line 32) | class DataCell:
method __init__ (line 37) | def __init__(
method build_cell_graph (line 66) | def build_cell_graph(
method update (line 82) | def update(self, result: ProcessorResult) -> None:
FILE: gs_quant/analytics/datagrid/data_column.py
class RenderType (line 24) | class RenderType:
class HeatMapColorRange (line 34) | class HeatMapColorRange:
method from_dict (line 44) | def from_dict(cls, dict_: dict):
class MultiColumnGroup (line 50) | class MultiColumnGroup:
method asdict (line 68) | def asdict(self):
method from_dict (line 78) | def from_dict(cls, dict_: dict):
class ColumnFormat (line 88) | class ColumnFormat:
method __init__ (line 89) | def __init__(
method as_dict (line 113) | def as_dict(self):
method from_dict (line 129) | def from_dict(cls, obj: dict):
class DataColumn (line 139) | class DataColumn:
method __init__ (line 142) | def __init__(
method as_dict (line 162) | def as_dict(self):
method from_dict (line 175) | def from_dict(cls, obj: Dict, reference_list: List):
FILE: gs_quant/analytics/datagrid/data_row.py
class Override (line 38) | class Override(ABC):
method __init__ (line 41) | def __init__(self, column_names: List[str]):
method as_dict (line 49) | def as_dict(self) -> Dict:
method from_dict (line 53) | def from_dict(cls, obj, reference_list):
class ValueOverride (line 57) | class ValueOverride(Override):
method __init__ (line 58) | def __init__(self, column_names: List[str], value: Union[float, str, b...
method as_dict (line 68) | def as_dict(self):
method from_dict (line 75) | def from_dict(cls, obj, ref):
class DimensionsOverride (line 79) | class DimensionsOverride(Override):
method __init__ (line 80) | def __init__(
method as_dict (line 97) | def as_dict(self):
method from_dict (line 107) | def from_dict(cls, obj, reference_list):
class ProcessorOverride (line 123) | class ProcessorOverride(Override):
method __init__ (line 124) | def __init__(self, column_names: List[str], processor: BaseProcessor):
method as_dict (line 133) | def as_dict(self):
method from_dict (line 145) | def from_dict(cls, obj, reference_list):
class RowSeparator (line 152) | class RowSeparator:
method __init__ (line 153) | def __init__(self, name: str):
method as_dict (line 160) | def as_dict(self):
method from_dict (line 164) | def from_dict(cls, obj):
class DataRow (line 168) | class DataRow:
method __init__ (line 171) | def __init__(self, entity: Entity, overrides: Optional[List[Override]]...
method as_dict (line 180) | def as_dict(self):
method from_dict (line 191) | def from_dict(cls, obj, reference_list):
FILE: gs_quant/analytics/datagrid/datagrid.py
class DataGrid (line 74) | class DataGrid:
method __init__ (line 122) | def __init__(
method get_id (line 163) | def get_id(self) -> Optional[str]:
method initialize (line 167) | def initialize(self) -> None:
method poll (line 236) | def poll(self) -> None:
method save (line 245) | def save(self) -> str:
method create (line 259) | def create(self):
method delete (line 270) | def delete(self):
method open (line 280) | def open(self):
method polling_time (line 294) | def polling_time(self):
method polling_time (line 298) | def polling_time(self, value):
method _process_special_cells (line 305) | def _process_special_cells(self) -> None:
method _resolve_rdates (line 334) | def _resolve_rdates(self, rule_cache: Dict = None):
method _resolve_queries (line 363) | def _resolve_queries(self, availability_cache: Dict = None) -> None:
method _fetch_queries (line 413) | def _fetch_queries(self):
method aggregate_queries (line 452) | def aggregate_queries(query_infos):
method _post_process (line 467) | def _post_process(self) -> pd.DataFrame:
method __handle_sorts (line 496) | def __handle_sorts(self, df):
method __handle_filters (line 510) | def __handle_filters(self, df) -> pd.DataFrame:
method to_frame (line 580) | def to_frame(self) -> pd.DataFrame:
method from_dict (line 592) | def from_dict(cls, obj, reference_list: Optional[List] = None):
method as_dict (line 627) | def as_dict(self):
method set_primary_column_index (line 652) | def set_primary_column_index(self, index: int):
method set_sorts (line 660) | def set_sorts(self, sorts: List[DataGridSort]):
method add_sort (line 668) | def add_sort(self, sort: DataGridSort, index: int = None):
method set_filters (line 680) | def set_filters(self, filters: List[DataGridFilter]):
method add_filter (line 688) | def add_filter(self, filter_: DataGridFilter, index: int = None):
method __as_json (line 700) | def __as_json(self) -> str:
function _get_overrides (line 704) | def _get_overrides(
FILE: gs_quant/analytics/datagrid/serializers.py
function row_from_dict (line 22) | def row_from_dict(row: Dict, reference_list: List):
FILE: gs_quant/analytics/datagrid/utils.py
function get_utc_now (line 23) | def get_utc_now() -> str:
class SortType (line 27) | class SortType(str, Enum):
class SortOrder (line 32) | class SortOrder(str, Enum):
class FilterOperation (line 37) | class FilterOperation(str, Enum):
class FilterCondition (line 50) | class FilterCondition(str, Enum):
class DataGridSort (line 56) | class DataGridSort:
method __post_init__ (line 61) | def __post_init__(self):
method from_dict (line 66) | def from_dict(cls, dict_):
class DataGridFilter (line 72) | class DataGridFilter:
method __post_init__ (line 78) | def __post_init__(self):
method from_dict (line 83) | def from_dict(cls, dict_):
FILE: gs_quant/analytics/processors/analysis_processors.py
class DiffProcessor (line 24) | class DiffProcessor(BaseProcessor):
method __init__ (line 25) | def __init__(
method process (line 55) | def process(self):
method get_plot_expression (line 68) | def get_plot_expression(self):
FILE: gs_quant/analytics/processors/econometrics_processors.py
class VolatilityProcessor (line 42) | class VolatilityProcessor(BaseProcessor):
method __init__ (line 43) | def __init__(
method process (line 73) | def process(self):
method get_plot_expression (line 86) | def get_plot_expression(self):
class SharpeRatioProcessor (line 90) | class SharpeRatioProcessor(BaseProcessor):
method __init__ (line 91) | def __init__(
method get_excess_returns_query (line 125) | def get_excess_returns_query(self) -> DataQueryInfo:
method process (line 135) | def process(self):
method get_plot_expression (line 149) | def get_plot_expression(self):
class CorrelationProcessor (line 153) | class CorrelationProcessor(BaseProcessor):
method __init__ (line 154) | def __init__(
method get_benchmark_coordinate (line 193) | def get_benchmark_coordinate(self) -> DataQueryInfo:
method process (line 198) | def process(self):
method get_plot_expression (line 212) | def get_plot_expression(self):
class ChangeProcessor (line 216) | class ChangeProcessor(BaseProcessor):
method __init__ (line 217) | def __init__(
method process (line 239) | def process(self):
method get_plot_expression (line 248) | def get_plot_expression(self):
class ReturnsProcessor (line 252) | class ReturnsProcessor(BaseProcessor):
method __init__ (line 253) | def __init__(
method process (line 282) | def process(self):
method get_plot_expression (line 298) | def get_plot_expression(self):
class BetaProcessor (line 302) | class BetaProcessor(BaseProcessor):
method __init__ (line 303) | def __init__(
method process (line 337) | def process(self):
method get_plot_expression (line 358) | def get_plot_expression(self):
class FXImpliedCorrProcessor (line 362) | class FXImpliedCorrProcessor(MeasureProcessor):
method __init__ (line 363) | def __init__(
method process (line 392) | def process(self, cross1: Entity) -> ProcessorResult:
method get_plot_expression (line 405) | def get_plot_expression(self):
FILE: gs_quant/analytics/processors/scale_processors.py
class SpotMarkerProcessor (line 25) | class SpotMarkerProcessor(BaseProcessor):
method __init__ (line 26) | def __init__(self, a: BaseProcessor, *, name: str, shape: ScaleShape):
method process (line 42) | def process(self):
method get_plot_expression (line 56) | def get_plot_expression(self):
class BarMarkerProcessor (line 60) | class BarMarkerProcessor(BaseProcessor):
method __init__ (line 61) | def __init__(self, start: BaseProcessor, end: BaseProcessor, *, name: ...
method process (line 76) | def process(self):
method get_plot_expression (line 92) | def get_plot_expression(self):
function validate_markers_data (line 99) | def validate_markers_data(result: Dict, marker_data: Dict) -> Tuple[bool...
class ScaleProcessor (line 137) | class ScaleProcessor(BaseProcessor):
method __init__ (line 138) | def __init__(self, minimum: BaseProcessor, maximum: BaseProcessor, *, ...
method process (line 155) | def process(self):
method get_plot_expression (line 177) | def get_plot_expression(self):
FILE: gs_quant/analytics/processors/special_processors.py
class EntityProcessor (line 28) | class EntityProcessor(BaseProcessor):
method __init__ (line 29) | def __init__(self, field: str):
method process (line 38) | def process(self, entity: Entity) -> ProcessorResult:
method update (line 62) | def update(self, attribute: str, result: ProcessorResult) -> None:
method get_plot_expression (line 66) | def get_plot_expression(self):
class CoordinateProcessor (line 71) | class CoordinateProcessor(BaseProcessor):
method __init__ (line 72) | def __init__(self, a: DataCoordinate, dimension: Union[DataDimension, ...
method process (line 84) | def process(self):
method update (line 93) | def update(self, attribute: str, result: ProcessorResult):
method get_plot_expression (line 96) | def get_plot_expression(self):
class MeasureProcessor (line 100) | class MeasureProcessor(BaseProcessor):
method __init__ (line 101) | def __init__(self, **kwargs):
method process (line 104) | def process(self, *args):
method get_plot_expression (line 107) | def get_plot_expression(self):
FILE: gs_quant/analytics/processors/statistics_processors.py
class PercentilesProcessor (line 27) | class PercentilesProcessor(BaseProcessor):
method __init__ (line 28) | def __init__(
method process (line 56) | def process(self):
method get_plot_expression (line 77) | def get_plot_expression(self):
class PercentileProcessor (line 81) | class PercentileProcessor(BaseProcessor):
method __init__ (line 82) | def __init__(
method process (line 109) | def process(self):
method get_plot_expression (line 128) | def get_plot_expression(self):
class MeanProcessor (line 132) | class MeanProcessor(BaseProcessor):
method __init__ (line 133) | def __init__(
method process (line 166) | def process(self):
method get_plot_expression (line 183) | def get_plot_expression(self):
class SumProcessor (line 187) | class SumProcessor(BaseProcessor):
method __init__ (line 188) | def __init__(
method process (line 221) | def process(self):
method get_plot_expression (line 238) | def get_plot_expression(self):
class StdDevProcessor (line 242) | class StdDevProcessor(BaseProcessor):
method __init__ (line 243) | def __init__(
method process (line 275) | def process(self):
method get_plot_expression (line 292) | def get_plot_expression(self):
class VarianceProcessor (line 296) | class VarianceProcessor(BaseProcessor):
method __init__ (line 297) | def __init__(
method process (line 328) | def process(self):
method get_plot_expression (line 345) | def get_plot_expression(self):
class CovarianceProcessor (line 349) | class CovarianceProcessor(BaseProcessor):
method __init__ (line 350) | def __init__(
method process (line 384) | def process(self):
method get_plot_expression (line 405) | def get_plot_expression(self):
class ZscoresProcessor (line 409) | class ZscoresProcessor(BaseProcessor):
method __init__ (line 410) | def __init__(
method process (line 445) | def process(self):
method get_plot_expression (line 458) | def get_plot_expression(self):
class StdMoveProcessor (line 462) | class StdMoveProcessor(BaseProcessor):
method __init__ (line 463) | def __init__(
method process (line 488) | def process(self):
method get_plot_expression (line 510) | def get_plot_expression(self):
class CompoundGrowthRate (line 514) | class CompoundGrowthRate(BaseProcessor):
method __init__ (line 515) | def __init__(
method process (line 538) | def process(self):
method get_plot_expression (line 552) | def get_plot_expression(self):
FILE: gs_quant/analytics/processors/utility_processors.py
class LastProcessor (line 25) | class LastProcessor(BaseProcessor):
method __init__ (line 26) | def __init__(
method process (line 48) | def process(self):
method get_plot_expression (line 57) | def get_plot_expression(self):
class MinProcessor (line 61) | class MinProcessor(BaseProcessor):
method __init__ (line 62) | def __init__(
method process (line 84) | def process(self):
method get_plot_expression (line 97) | def get_plot_expression(self):
class MaxProcessor (line 101) | class MaxProcessor(BaseProcessor):
method __init__ (line 102) | def __init__(
method process (line 124) | def process(self):
method get_plot_expression (line 137) | def get_plot_expression(self):
class AppendProcessor (line 141) | class AppendProcessor(BaseProcessor):
method __init__ (line 142) | def __init__(
method process (line 167) | def process(self):
method get_plot_expression (line 181) | def get_plot_expression(self):
class AdditionProcessor (line 185) | class AdditionProcessor(BaseProcessor):
method __init__ (line 186) | def __init__(
method process (line 215) | def process(self):
method get_plot_expression (line 235) | def get_plot_expression(self):
class SubtractionProcessor (line 239) | class SubtractionProcessor(BaseProcessor):
method __init__ (line 240) | def __init__(
method process (line 269) | def process(self):
method get_plot_expression (line 289) | def get_plot_expression(self):
class MultiplicationProcessor (line 293) | class MultiplicationProcessor(BaseProcessor):
method __init__ (line 296) | def __init__(
method process (line 325) | def process(self):
method get_plot_expression (line 345) | def get_plot_expression(self):
class DivisionProcessor (line 349) | class DivisionProcessor(BaseProcessor):
method __init__ (line 350) | def __init__(
method process (line 379) | def process(self):
method get_plot_expression (line 399) | def get_plot_expression(self):
class OneDayProcessor (line 403) | class OneDayProcessor(BaseProcessor):
method __init__ (line 404) | def __init__(self, a: DataCoordinateOrProcessor, **kwargs):
method process (line 408) | def process(self):
method get_plot_expression (line 425) | def get_plot_expression(self):
class NthLastProcessor (line 429) | class NthLastProcessor(BaseProcessor):
method __init__ (line 430) | def __init__(
method process (line 454) | def process(self):
method get_plot_expression (line 467) | def get_plot_expression(self):
FILE: gs_quant/analytics/workspaces/components.py
class Selection (line 25) | class Selection:
method __init__ (line 26) | def __init__(self, selector_id: str, tag: str):
method selector_id (line 36) | def selector_id(self):
method selector_id (line 40) | def selector_id(self, value):
method tag (line 44) | def tag(self):
method tag (line 48) | def tag(self, value):
method as_dict (line 51) | def as_dict(self):
method from_dict (line 55) | def from_dict(cls, obj):
class LegendItem (line 59) | class LegendItem:
method __init__ (line 60) | def __init__(self, color: str, icon: str, name: str, tooltip: str = No...
method as_dict (line 73) | def as_dict(self):
method from_dict (line 80) | def from_dict(cls, obj):
class RelatedLinkType (line 84) | class RelatedLinkType(Enum):
class RelatedLink (line 92) | class RelatedLink:
method __init__ (line 93) | def __init__(self, type_: RelatedLinkType, name: str, link: str, descr...
method as_dict (line 107) | def as_dict(self):
method from_dict (line 114) | def from_dict(cls, obj):
class PromoSize (line 120) | class PromoSize(Enum):
class Component (line 125) | class Component(ABC):
method __init__ (line 126) | def __init__(
method id_ (line 143) | def id_(self):
method id_ (line 147) | def id_(self, value):
method width (line 151) | def width(self):
method width (line 155) | def width(self, value):
method height (line 159) | def height(self):
method height (line 163) | def height(self, value):
method selections (line 167) | def selections(self):
method selections (line 171) | def selections(self, value):
method container_ids (line 175) | def container_ids(self):
method container_ids (line 179) | def container_ids(self, value):
method as_dict (line 183) | def as_dict(self) -> Dict:
method from_dict (line 193) | def from_dict(cls, obj, scale: int = None):
class PlotComponent (line 211) | class PlotComponent(Component):
method __init__ (line 212) | def __init__(
method as_dict (line 236) | def as_dict(self) -> Dict:
class DataVizComponent (line 244) | class DataVizComponent(Component):
method __init__ (line 245) | def __init__(self, height: int, id_: str, *, width: int = None):
method as_dict (line 255) | def as_dict(self) -> Dict:
class DataGridComponent (line 259) | class DataGridComponent(Component):
method __init__ (line 260) | def __init__(
method as_dict (line 275) | def as_dict(self) -> Dict:
class DataScreenerComponent (line 283) | class DataScreenerComponent(Component):
method __init__ (line 284) | def __init__(self, height: int, id_: str, *, width: int = None, toolti...
method as_dict (line 296) | def as_dict(self) -> Dict:
class ArticleComponent (line 304) | class ArticleComponent(Component):
method __init__ (line 305) | def __init__(
method as_dict (line 332) | def as_dict(self) -> Dict:
class CommentaryComponent (line 344) | class CommentaryComponent(Component):
method __init__ (line 345) | def __init__(
method as_dict (line 372) | def as_dict(self) -> Dict:
class ContainerComponent (line 384) | class ContainerComponent(Component):
method __init__ (line 385) | def __init__(self, id_: Optional[str] = None, *, width: int = None, co...
method as_dict (line 396) | def as_dict(self) -> Dict:
class SelectorComponent (line 404) | class SelectorComponent(Component):
method __init__ (line 405) | def __init__(
method as_dict (line 436) | def as_dict(self) -> Dict:
method from_dict (line 455) | def from_dict(cls, obj, scale: int = None):
class PromoComponent (line 470) | class PromoComponent(Component):
method __init__ (line 471) | def __init__(
method as_dict (line 504) | def as_dict(self) -> Dict:
method from_dict (line 520) | def from_dict(cls, obj: Dict, scale: int = None):
class SeparatorComponent (line 535) | class SeparatorComponent(Component):
method __init__ (line 536) | def __init__(
method as_dict (line 563) | def as_dict(self) -> Dict:
class LegendComponent (line 575) | class LegendComponent(Component):
method __init__ (line 576) | def __init__(
method as_dict (line 603) | def as_dict(self) -> Dict:
method from_dict (line 614) | def from_dict(cls, obj: Dict, scale: int = None):
class MonitorComponent (line 629) | class MonitorComponent(Component):
method __init__ (line 630) | def __init__(
method as_dict (line 645) | def as_dict(self) -> Dict:
class RelatedLinksComponent (line 653) | class RelatedLinksComponent(Component):
method __init__ (line 654) | def __init__(
method as_dict (line 678) | def as_dict(self) -> Dict:
method from_dict (line 685) | def from_dict(cls, obj, scale: int = None):
FILE: gs_quant/analytics/workspaces/workspace.py
class WorkspaceCallToAction (line 44) | class WorkspaceCallToAction:
method __init__ (line 45) | def __init__(self, actions: List[RelatedLink], text: str, name: str = ...
method as_dict (line 56) | def as_dict(self):
method from_dict (line 69) | def from_dict(cls, obj):
class WorkspaceTab (line 79) | class WorkspaceTab:
method __init__ (line 80) | def __init__(self, id_: str, name: str):
method as_dict (line 89) | def as_dict(self):
method from_dict (line 93) | def from_dict(cls, obj):
class WorkspaceColumn (line 97) | class WorkspaceColumn:
method __init__ (line 98) | def __init__(self, components: List[Union[Component, 'WorkspaceRow']],...
method components (line 107) | def components(self):
method components (line 111) | def components(self, value):
method width (line 133) | def width(self):
method width (line 137) | def width(self, value):
method get_layout (line 140) | def get_layout(self, count):
method _add_components (line 186) | def _add_components(self, components):
class WorkspaceRow (line 194) | class WorkspaceRow:
method __init__ (line 199) | def __init__(self, components: List[Union[Component, WorkspaceColumn]]):
method components (line 207) | def components(self):
method components (line 211) | def components(self, value):
method get_layout (line 232) | def get_layout(self, count: int) -> Tuple[str, int]:
method _add_components (line 294) | def _add_components(self, components):
class Workspace (line 302) | class Workspace:
method __init__ (line 310) | def __init__(
method get_by_id (line 338) | def get_by_id(cls, workspace_id: str) -> 'Workspace':
method get_by_alias (line 343) | def get_by_alias(cls, alias: str) -> 'Workspace':
method save (line 349) | def save(self):
method open (line 359) | def open(self):
method create (line 369) | def create(self):
method delete (line 373) | def delete(self):
method delete_all (line 379) | def delete_all(self, include_tabs: bool = False):
method name (line 394) | def name(self):
method name (line 398) | def name(self, value):
method alias (line 402) | def alias(self):
method alias (line 406) | def alias(self, value):
method rows (line 410) | def rows(self) -> List[WorkspaceRow]:
method rows (line 414) | def rows(self, value: List[WorkspaceRow]):
method entitlements (line 418) | def entitlements(self):
method entitlements (line 422) | def entitlements(self, value):
method description (line 426) | def description(self):
method description (line 430) | def description(self, value):
method disclaimer (line 434) | def disclaimer(self):
method disclaimer (line 438) | def disclaimer(self, value):
method maintainers (line 442) | def maintainers(self):
method maintainers (line 446) | def maintainers(self, value):
method tabs (line 450) | def tabs(self):
method tabs (line 454) | def tabs(self, value):
method selector_components (line 458) | def selector_components(self):
method selector_components (line 462) | def selector_components(self, value):
method call_to_action (line 466) | def call_to_action(self):
method call_to_action (line 470) | def call_to_action(self, value):
method tags (line 474) | def tags(self):
method tags (line 478) | def tags(self, value):
method id (line 482) | def id(self):
method _parse (line 486) | def _parse(cls, layout: str, workspace_components: List[Dict]):
method from_dict (line 524) | def from_dict(cls, obj):
method as_dict (line 566) | def as_dict(self):
method __delete_components (line 613) | def __delete_components(cls, components: List[Component]):
function __get_layout (line 628) | def __get_layout(components, count):
FILE: gs_quant/api/api_cache.py
class CacheEvent (line 28) | class CacheEvent(Enum):
class ApiRequestCache (line 33) | class ApiRequestCache(ABC):
method get (line 34) | def get(self, session: GsSession, key: Any, **kwargs):
method _get (line 41) | def _get(self, session: GsSession, key: Any, **kwargs):
method record (line 44) | def record(self, session: GsSession, key: Any, method: CacheEvent, **k...
method put (line 47) | def put(self, session: GsSession, key: Any, value, **kwargs):
method _put (line 52) | def _put(self, session: GsSession, key: Any, value, **kwargs):
class InMemoryApiRequestCache (line 56) | class InMemoryApiRequestCache(ApiRequestCache):
method __init__ (line 57) | def __init__(self, max_size=1000, ttl_in_seconds=3600):
method get_events (line 61) | def get_events(self) -> Tuple[Tuple[CacheEvent, Any], ...]:
method clear_events (line 64) | def clear_events(self):
method _make_str_key (line 67) | def _make_str_key(self, key: Any):
method _get (line 76) | def _get(self, session: GsSession, key: Any, **kwargs):
method record (line 79) | def record(self, session: GsSession, key: Any, method: CacheEvent, **k...
method _put (line 82) | def _put(self, session: GsSession, key, value, **kwargs):
FILE: gs_quant/api/api_session.py
class ApiWithCustomSession (line 22) | class ApiWithCustomSession:
method set_session_provider (line 26) | def set_session_provider(cls, session_supplier: Callable[[], GsSession]):
method set_session (line 35) | def set_session(cls, session: GsSession):
method get_session (line 44) | def get_session(cls) -> GsSession:
FILE: gs_quant/api/data.py
class DataApi (line 34) | class DataApi(ApiWithCustomSession, metaclass=ABCMeta):
method query_data (line 36) | def query_data(cls, query: Union[DataQuery, FredQuery], dataset_id: st...
method last_data (line 40) | def last_data(cls, query: DataQuery, dataset_id: str = None) -> Union[...
method symbol_dimensions (line 44) | def symbol_dimensions(cls, dataset_id: str) -> tuple:
method time_field (line 48) | def time_field(cls, dataset_id: str) -> str:
method construct_dataframe_with_types (line 52) | def construct_dataframe_with_types(
method build_query (line 58) | def build_query(
FILE: gs_quant/api/fred/data.py
class FredDataApi (line 43) | class FredDataApi(DataApi):
method __init__ (line 48) | def __init__(self, api_key=None):
method build_query (line 58) | def build_query(
method query_data (line 86) | def query_data(self, query: FredQuery, dataset_id: str, asset_id_type:...
method last_data (line 100) | def last_data(self, query: FredQuery, dataset_id: str) -> pd.Series:
method __handle_response (line 114) | def __handle_response(response: str) -> pd.Series:
method construct_dataframe_with_types (line 135) | def construct_dataframe_with_types(
method symbol_dimensions (line 149) | def symbol_dimensions(self, dataset_id: str) -> tuple:
method time_field (line 154) | def time_field(self, dataset_id: str) -> str:
FILE: gs_quant/api/fred/fred_query.py
class FredQuery (line 28) | class FredQuery:
FILE: gs_quant/api/gs/assets.py
class AssetCache (line 55) | class AssetCache:
method __init__ (line 56) | def __init__(self, cache: ApiRequestCache, ttl: int, construct_key_fn:...
method ttl (line 62) | def ttl(self):
method cache (line 66) | def cache(self):
method construct_key_fn (line 70) | def construct_key_fn(self):
method construct_key (line 73) | def construct_key(self, session: GsSession, *args, **kwargs):
function get_default_cache (line 77) | def get_default_cache() -> AssetCache:
function _cached (line 92) | def _cached(fn):
function _cached_async (line 124) | def _cached_async(fn):
class GsIdType (line 156) | class GsIdType(Enum):
class GsAsset (line 173) | class GsAsset(__Asset):
class GsTemporalXRef (line 179) | class GsTemporalXRef(TemporalXRef):
class GsAssetApi (line 183) | class GsAssetApi:
method set_cache (line 189) | def set_cache(cls, cache: AssetCache):
method get_cache (line 193) | def get_cache(cls) -> Optional[AssetCache]:
method __create_query (line 197) | def __create_query(
method _set_tags (line 226) | def _set_tags(scope, kwargs):
method get_many_assets (line 239) | def get_many_assets(
method get_many_assets_async (line 258) | async def get_many_assets_async(
method get_many_assets_scroll (line 277) | def get_many_assets_scroll(
method get_many_assets_data (line 302) | def get_many_assets_data(
method get_many_assets_data_async (line 316) | async def get_many_assets_data_async(
method get_many_assets_data_scroll (line 329) | def get_many_assets_data_scroll(
method resolve_assets (line 358) | def resolve_assets(
method get_many_asset_xrefs (line 371) | def get_many_asset_xrefs(
method get_asset_xrefs (line 386) | def get_asset_xrefs(cls, asset_id: str) -> Tuple[GsTemporalXRef, ...]:
method put_asset_xrefs (line 391) | def put_asset_xrefs(cls, asset_id: str, xrefs: List[TemporalXRef]):
method get_asset (line 396) | def get_asset(
method get_asset_async (line 404) | async def get_asset_async(
method get_asset_by_name (line 411) | def get_asset_by_name(cls, name: str) -> GsAsset:
method create_asset (line 423) | def create_asset(cls, asset: GsAsset) -> GsAsset:
method delete_asset (line 427) | def delete_asset(cls, asset_id: str):
method get_position_dates (line 431) | def get_position_dates(asset_id: str) -> Tuple[dt.date, ...]:
method get_asset_positions_for_date (line 436) | def get_asset_positions_for_date(
method get_asset_positions_for_dates (line 451) | def get_asset_positions_for_dates(
method get_latest_positions (line 482) | def get_latest_positions(asset_id: str, position_type: PositionType = ...
method get_or_create_asset_from_instrument (line 494) | def get_or_create_asset_from_instrument(instrument: Instrument) -> str:
method get_instruments_for_asset_ids (line 506) | def get_instruments_for_asset_ids(asset_ids: Tuple[str, ...]) -> Tuple...
method get_instruments_for_positions (line 514) | def get_instruments_for_positions(positions: Iterable[Position]) -> Tu...
method get_asset_positions_data (line 546) | def get_asset_positions_data(
method update_asset_entitlements (line 568) | def update_asset_entitlements(asset_id: str, entitlements: Entitlement...
method get_reports (line 577) | def get_reports(cls, asset_id: str) -> Tuple[Report, ...]:
method map_identifiers (line 582) | def map_identifiers(
FILE: gs_quant/api/gs/backtests.py
class GsBacktestApi (line 37) | class GsBacktestApi:
method get_many_backtests (line 41) | def get_many_backtests(
method get_backtest (line 55) | def get_backtest(cls, backtest_id: str) -> Backtest:
method create_backtest (line 59) | def create_backtest(cls, backtest: Backtest) -> Backtest:
method update_backtest (line 64) | def update_backtest(cls, backtest: Backtest):
method delete_backtest (line 71) | def delete_backtest(cls, backtest_id: str) -> dict:
method get_results (line 75) | def get_results(cls, backtest_id: str) -> Tuple[BacktestResult, ...]:
method get_comparison_results (line 79) | def get_comparison_results(
method schedule_backtest (line 111) | def schedule_backtest(cls, backtest_id: str) -> dict:
method run_backtest (line 115) | def run_backtest(
method backtest_result_from_response (line 134) | def backtest_result_from_response(cls, response: dict) -> BacktestResult:
method calculate_position_risk (line 147) | def calculate_position_risk(
method get_ref_data (line 156) | def get_ref_data(cls) -> BacktestRefData:
method update_ref_data (line 160) | def update_ref_data(cls, backtest_ref_data: BacktestRefData):
class GsBacktestApiAsync (line 167) | class GsBacktestApiAsync(GsBacktestApi):
method calculate_position_risk (line 169) | async def calculate_position_risk(
method run_backtest (line 179) | async def run_backtest(
FILE: gs_quant/api/gs/backtests_xasset/apis.py
class GsBacktestXassetApi (line 22) | class GsBacktestXassetApi:
method calculate_risk (line 27) | def calculate_risk(cls, risk_request: RiskRequest) -> RiskResponse:
method calculate_basic_backtest (line 35) | def calculate_basic_backtest(
class GsBacktestXassetApiAsync (line 48) | class GsBacktestXassetApiAsync(GsBacktestXassetApi):
method calculate_risk (line 50) | async def calculate_risk(cls, risk_request: RiskRequest) -> RiskResponse:
method calculate_basic_backtest (line 58) | async def calculate_basic_backtest(
FILE: gs_quant/api/gs/backtests_xasset/json_encoders/request_encoders.py
function encode_request_object (line 25) | def encode_request_object(data: Any):
function legs_decoder (line 34) | def legs_decoder(data: Any):
function legs_encoder (line 52) | def legs_encoder(data: Iterable[Instrument]):
function enum_decode (line 56) | def enum_decode(enum_class):
FILE: gs_quant/api/gs/backtests_xasset/json_encoders/response_datatypes/generic_datatype_encoders.py
function decode_inst (line 23) | def decode_inst(i: dict) -> Instrument:
function decode_inst_tuple (line 27) | def decode_inst_tuple(t: tuple) -> Tuple[Instrument, ...]:
function decode_daily_portfolio (line 31) | def decode_daily_portfolio(results: dict, decode_instruments: bool = Tru...
FILE: gs_quant/api/gs/backtests_xasset/json_encoders/response_datatypes/risk_result_datatype_encoders.py
function encode_series_result (line 22) | def encode_series_result(s: pd.Series) -> Dict:
function encode_dataframe_result (line 26) | def encode_dataframe_result(df: pd.DataFrame) -> Dict:
function _convert_list_to_dates (line 30) | def _convert_list_to_dates(lst: list):
function decode_series_result (line 40) | def decode_series_result(s: dict) -> pd.Series:
function decode_dataframe_result (line 44) | def decode_dataframe_result(s: dict) -> pd.DataFrame:
FILE: gs_quant/api/gs/backtests_xasset/json_encoders/response_datatypes/risk_result_encoders.py
function map_result_to_datatype (line 49) | def map_result_to_datatype(data: Any) -> Type[RiskResultWithData]:
function decode_risk_result_with_data (line 65) | def decode_risk_result_with_data(r: dict) -> RiskResultWithData:
function decode_risk_result (line 69) | def decode_risk_result(d: dict) -> RiskResults:
FILE: gs_quant/api/gs/backtests_xasset/json_encoders/response_datatypes/test_backtest_datatypes_encoders.py
function test_transaction_cost_config_encoding (line 30) | def test_transaction_cost_config_encoding():
FILE: gs_quant/api/gs/backtests_xasset/json_encoders/response_encoders.py
function encode_response_obj (line 42) | def encode_response_obj(data: Any) -> Dict:
function decode_leg_refs (line 52) | def decode_leg_refs(d: dict) -> Dict[str, PriceableImpl]:
function decode_risk_measure_refs (line 56) | def decode_risk_measure_refs(d: dict) -> Dict[str, RiskMeasure]:
function decode_result_tuple (line 60) | def decode_result_tuple(results: tuple):
function decode_basic_bt_measure_dict (line 64) | def decode_basic_bt_measure_dict(results: dict) -> Dict[FlowVolBacktestM...
function decode_basic_bt_transactions (line 71) | def decode_basic_bt_transactions(
FILE: gs_quant/api/gs/backtests_xasset/request.py
class RiskProviderEnum (line 41) | class RiskProviderEnum(EnumBase, Enum):
class RiskRequest (line 49) | class RiskRequest:
class BasicBacktestRequest (line 68) | class BasicBacktestRequest:
class GenericBacktestRequest (line 83) | class GenericBacktestRequest:
FILE: gs_quant/api/gs/backtests_xasset/response.py
class RiskResponse (line 45) | class RiskResponse:
class BasicBacktestResponse (line 53) | class BasicBacktestResponse:
method from_dict_custom (line 66) | def from_dict_custom(cls, data: Any, decode_instruments: bool = True):
class GenericBacktestResponse (line 81) | class GenericBacktestResponse:
FILE: gs_quant/api/gs/backtests_xasset/response_datatypes/backtest_datatypes.py
class TransactionCostModel (line 43) | class TransactionCostModel(Enum):
class TransactionDirection (line 47) | class TransactionDirection(Enum):
class RollDateMode (line 52) | class RollDateMode(Enum):
method _missing_ (line 57) | def _missing_(cls, value):
class TransactionCostScalingType (line 66) | class TransactionCostScalingType(Enum):
class CostAggregationType (line 73) | class CostAggregationType(Enum):
class HedgeRiskMeasure (line 79) | class HedgeRiskMeasure(Enum):
class Transaction (line 85) | class Transaction:
class TradeEvent (line 96) | class TradeEvent:
function decode_trade_event_tuple_dict (line 102) | def decode_trade_event_tuple_dict(results: dict) -> Dict[dt.date, Tuple[...
class AdditionalResults (line 108) | class AdditionalResults:
method from_dict_custom (line 122) | def from_dict_custom(cls, data: Any, decode_instruments: bool = True):
class DateConfig (line 136) | class DateConfig:
class Trade (line 145) | class Trade:
class Model (line 163) | class Model(AlgebraicType):
method scaling_property (line 168) | def scaling_property(self): ...
method set_scaling_property (line 170) | def set_scaling_property(self, value: float):
method __add__ (line 173) | def __add__(self, other):
method __sub__ (line 188) | def __sub__(self, other):
method __mul__ (line 191) | def __mul__(self, other):
method __div__ (line 194) | def __div__(self, other):
class FixedCostModel (line 200) | class FixedCostModel(Model):
method scaling_property (line 205) | def scaling_property(self):
method __eq__ (line 208) | def __eq__(self, other):
class ScaledCostModel (line 216) | class ScaledCostModel(Model):
method scaling_property (line 222) | def scaling_property(self):
method __eq__ (line 225) | def __eq__(self, other):
function basic_tc_tuple_decoder (line 239) | def basic_tc_tuple_decoder(data: Optional[Tuple[dict, ...]]) -> Optional...
class AggregateCostModel (line 247) | class AggregateCostModel(Model):
method scaling_property (line 253) | def scaling_property(self):
method set_scaling_property (line 256) | def set_scaling_property(self, value: float):
method __add__ (line 259) | def __add__(self, other):
method __eq__ (line 264) | def __eq__(self, other):
function tcm_decoder (line 270) | def tcm_decoder(data: Optional[dict]) -> Optional[Union[FixedCostModel, ...
class TradingCosts (line 280) | class TradingCosts:
class TransactionCostConfig (line 291) | class TransactionCostConfig:
class Configuration (line 298) | class Configuration:
class StrategyHedge (line 308) | class StrategyHedge:
FILE: gs_quant/api/gs/backtests_xasset/response_datatypes/generic_backtest_datatypes.py
class Strategy (line 23) | class Strategy(object):
FILE: gs_quant/api/gs/backtests_xasset/response_datatypes/risk_result.py
class RefType (line 28) | class RefType(Enum):
class RiskResults (line 35) | class RiskResults:
class RiskResultsByDate (line 41) | class RiskResultsByDate(RiskResults):
class RiskResultsError (line 47) | class RiskResultsError(RiskResults):
FILE: gs_quant/api/gs/backtests_xasset/response_datatypes/risk_result_datatypes.py
class RiskResultWithData (line 35) | class RiskResultWithData:
method check_can_aggregate (line 38) | def check_can_aggregate(self, other):
method __add__ (line 46) | def __add__(self, other):
method __radd__ (line 51) | def __radd__(self, other):
method __sub__ (line 56) | def __sub__(self, other):
method __mul__ (line 61) | def __mul__(self, other):
method __rmul__ (line 66) | def __rmul__(self, other):
method __truediv__ (line 71) | def __truediv__(self, other):
class FloatWithData (line 79) | class FloatWithData(RiskResultWithData):
class StringWithData (line 86) | class StringWithData(RiskResultWithData):
class VectorWithData (line 93) | class VectorWithData(RiskResultWithData):
class MatrixWithData (line 102) | class MatrixWithData(RiskResultWithData):
class DefnValuesWithData (line 111) | class DefnValuesWithData(RiskResultWithData):
class DictsWithData (line 118) | class DictsWithData(RiskResultWithData):
FILE: gs_quant/api/gs/base_screener.py
class GsBaseScreenerApi (line 25) | class GsBaseScreenerApi:
method get_screeners (line 27) | def get_screeners(cls) -> Tuple[Screener, ...]:
method get_screener (line 36) | def get_screener(cls, screener_id: str) -> Screener:
method create_screener (line 48) | def create_screener(cls, screener: Screener) -> Screener:
method edit_screener (line 65) | def edit_screener(cls, screener_id: str, screener: Screener) -> Screener:
method publish_to_screener (line 93) | def publish_to_screener(cls, screener_id: str, data: Dict[str, List[Di...
method clear_screener (line 114) | def clear_screener(cls, screener_id: str) -> Dict[str, Any]:
method delete_screener (line 132) | def delete_screener(cls, screener_id: str) -> None:
FILE: gs_quant/api/gs/carbon.py
class CarbonCard (line 28) | class CarbonCard(Enum):
method __str__ (line 41) | def __str__(self):
class CarbonCoverageCategory (line 45) | class CarbonCoverageCategory(Enum):
method __str__ (line 53) | def __str__(self):
class CarbonTargetCoverageCategory (line 57) | class CarbonTargetCoverageCategory(Enum):
method __str__ (line 65) | def __str__(self):
class CarbonScope (line 69) | class CarbonScope(Enum):
method __str__ (line 78) | def __str__(self):
class CarbonEmissionsAllocationCategory (line 82) | class CarbonEmissionsAllocationCategory(Enum):
method __str__ (line 91) | def __str__(self):
class CarbonEmissionsIntensityType (line 95) | class CarbonEmissionsIntensityType(Enum):
method __str__ (line 104) | def __str__(self):
class CarbonEntityType (line 108) | class CarbonEntityType(Enum):
method __str__ (line 116) | def __str__(self):
class CarbonAnalyticsView (line 120) | class CarbonAnalyticsView(Enum):
method __str__ (line 128) | def __str__(self):
class GsCarbonApi (line 132) | class GsCarbonApi:
method get_carbon_analytics (line 136) | def get_carbon_analytics(
FILE: gs_quant/api/gs/content.py
class OrderBy (line 27) | class OrderBy(Enum):
method __str__ (line 35) | def __str__(self):
class GsContentApi (line 39) | class GsContentApi:
method get_contents (line 43) | def get_contents(
method get_text (line 95) | def get_text(contents: List[ContentResponse]) -> List[Tuple[str, str]]:
method _build_parameters_dict (line 114) | def _build_parameters_dict(cls, **kwargs) -> dict:
method _build_query_string (line 127) | def _build_query_string(cls, parameters: dict) -> str:
method _convert_order_by (line 158) | def _convert_order_by(cls, order_by: dict) -> str:
FILE: gs_quant/api/gs/countries.py
class GsCountryApi (line 23) | class GsCountryApi:
method get_many_countries (line 27) | def get_many_countries(cls, limit: int = 100) -> Tuple[Country, ...]:
method get_many_countries_async (line 31) | async def get_many_countries_async(cls, limit: int = 100) -> Tuple[Cou...
method get_country (line 36) | def get_country(cls, country_id: str) -> Country:
method get_country_async (line 40) | async def get_country_async(cls, country_id: str) -> Country:
method create_country (line 45) | def create_country(cls, country: Country) -> Country:
method update_country (line 49) | def update_country(cls, country: Country):
method delete_country (line 53) | def delete_country(cls, country_id: str) -> dict:
method get_many_subdivisions (line 57) | def get_many_subdivisions(cls, limit: int = 100) -> Tuple[Subdivision,...
method get_subdivision (line 63) | def get_subdivision(cls, subdivision_id: str) -> Subdivision:
method create_subdivision (line 67) | def create_subdivision(cls, subdivision: Subdivision) -> Subdivision:
method update_subdivision (line 71) | def update_subdivision(cls, subdivision: Subdivision):
method delete_subdivision (line 77) | def delete_subdivision(cls, subdivision_id: str) -> dict:
FILE: gs_quant/api/gs/data.py
class QueryType (line 51) | class QueryType(Enum):
class GsDataApi (line 193) | class GsDataApi(DataApi):
method set_api_request_cache (line 202) | def set_api_request_cache(cls, cache: ApiRequestCache):
method _construct_cache_key (line 206) | def _construct_cache_key(cls, url, **kwargs) -> tuple:
method _check_cache (line 222) | def _check_cache(cls, url, **kwargs):
method _post_with_cache_check (line 231) | def _post_with_cache_check(cls, url, validator=lambda x: x, domain=Non...
method _get_with_cache_check (line 240) | def _get_with_cache_check(cls, url, validator=lambda x: x, domain=None...
method _get_with_cache_check_async (line 249) | async def _get_with_cache_check_async(cls, url, validator=lambda x: x,...
method _post_with_cache_check_async (line 259) | async def _post_with_cache_check_async(cls, url, validator=lambda x: x...
method query_data (line 269) | def query_data(
method query_data_async (line 283) | async def query_data_async(
method execute_query (line 298) | def execute_query(cls, dataset_id: str, query: Union[DataQuery, MDAPID...
method execute_query_async (line 307) | async def execute_query_async(cls, dataset_id: str, query: Union[DataQ...
method _check_data_on_cloud (line 317) | def _check_data_on_cloud(cls, dataset_id: str):
method _check_data_on_cloud_async (line 328) | async def _check_data_on_cloud_async(cls, dataset_id: str):
method _get_results (line 339) | def _get_results(response: Union[DataQueryResponse, dict]):
method get_results (line 357) | def get_results(
method get_results_async (line 373) | async def get_results_async(
method last_data (line 389) | def last_data(
method symbol_dimensions (line 406) | def symbol_dimensions(cls, dataset_id: str) -> tuple:
method time_field (line 411) | def time_field(cls, dataset_id: str) -> str:
method _build_params (line 417) | def _build_params(
method get_coverage (line 440) | def get_coverage(
method get_coverage_async (line 468) | async def get_coverage_async(
method create (line 493) | def create(cls, definition: Union[DataSetEntity, dict]) -> DataSetEntity:
method get_catalog_url (line 498) | def get_catalog_url(cls, dataset_id: str) -> DataSetEntity:
method delete_dataset (line 507) | def delete_dataset(cls, dataset_id: str) -> dict:
method undelete_dataset (line 512) | def undelete_dataset(cls, dataset_id: str) -> dict:
method update_definition (line 517) | def update_definition(cls, dataset_id: str, definition: Union[DataSetE...
method upload_data (line 524) | def upload_data(cls, dataset_id: str, data: Union[pd.DataFrame, list, ...
method delete_data (line 536) | def delete_data(cls, dataset_id: str, delete_query: Dict) -> Dict:
method get_definition (line 544) | def get_definition(cls, dataset_id: str) -> DataSetEntity:
method get_many_definitions (line 556) | def get_many_definitions(
method get_catalog (line 583) | def get_catalog(
method get_many_coordinates (line 619) | def get_many_coordinates(
method _to_zulu (line 657) | def _to_zulu(cls, d):
method get_mxapi_curve_measure (line 661) | def get_mxapi_curve_measure(
method get_mxapi_vector_measure (line 757) | def get_mxapi_vector_measure(
method get_mxapi_backtest_data (line 835) | def get_mxapi_backtest_data(
method _get_market_data_filters (line 932) | def _get_market_data_filters(
method build_interval_chunked_market_data_queries (line 954) | def build_interval_chunked_market_data_queries(
method build_market_data_query (line 993) | def build_market_data_query(
method get_data_providers (line 1020) | def get_data_providers(cls, entity_id: str, availability: Optional[Dic...
method get_market_data (line 1062) | def get_market_data(cls, query, request_id=None, ignore_errors: bool =...
method __normalise_coordinate_data (line 1109) | def __normalise_coordinate_data(
method __df_from_coordinate_data (line 1137) | def __df_from_coordinate_data(
method _sort_coordinate_data (line 1148) | def _sort_coordinate_data(
method _coordinate_from_str (line 1168) | def _coordinate_from_str(cls, coordinate_str: str) -> MarketDataCoordi...
method coordinates_last (line 1189) | def coordinates_last(
method coordinates_data (line 1254) | def coordinates_data(
method coordinates_data_series (line 1304) | def coordinates_data_series(
method get_types (line 1349) | def get_types(cls, dataset_id: str):
method get_field_types (line 1362) | def get_field_types(cls, field_names: Union[str, List[str]]):
method construct_dataframe_with_types (line 1379) | def construct_dataframe_with_types(
method get_dataset_fields (line 1429) | def get_dataset_fields(
method create_dataset_fields (line 1456) | def create_dataset_fields(
method update_dataset_fields (line 1481) | def update_dataset_fields(
class MarketDataResponseFrame (line 1508) | class MarketDataResponseFrame(pd.DataFrame):
method _constructor (line 1513) | def _constructor(self):
method __finalize__ (line 1516) | def __finalize__(self, other, method=None, **kwargs):
FILE: gs_quant/api/gs/data_screen.py
class GsDataScreenApi (line 25) | class GsDataScreenApi:
method get_screens (line 27) | def get_screens(cls) -> Tuple[AnalyticsScreen, ...]:
method get_screen (line 36) | def get_screen(cls, screen_id: str) -> AnalyticsScreen:
method get_column_info (line 47) | def get_column_info(cls, screen_id: str) -> Dict[str, Dict]:
method delete_screen (line 60) | def delete_screen(cls, screen_id: str) -> None:
method create_screen (line 71) | def create_screen(cls, screen: AnalyticsScreen) -> AnalyticsScreen:
method filter_screen (line 87) | def filter_screen(cls, screen_id: str, filter_request: FilterRequest) ...
method update_screen (line 110) | def update_screen(cls, screen_id: str, screen: AnalyticsScreen) -> Ana...
FILE: gs_quant/api/gs/datagrid.py
class GsDataGridApi (line 28) | class GsDataGridApi:
method get_datagrids (line 32) | def get_datagrids(cls, limit: int = 10, **kwargs) -> List[DataGrid]:
method get_my_datagrids (line 43) | def get_my_datagrids(cls, limit: int = 10, **kwargs) -> List[DataGrid]:
method get_datagrid (line 55) | def get_datagrid(cls, datagrid_id: str) -> DataGrid:
method create_datagrid (line 60) | def create_datagrid(cls, datagrid: DataGrid) -> DataGrid:
method update_datagrid (line 66) | def update_datagrid(cls, datagrid: DataGrid):
method delete_datagrid (line 72) | def delete_datagrid(cls, datagrid: DataGrid):
FILE: gs_quant/api/gs/esg.py
class ESGCard (line 27) | class ESGCard(Enum):
method __str__ (line 43) | def __str__(self):
class ESGMeasure (line 47) | class ESGMeasure(Enum):
method __str__ (line 58) | def __str__(self):
class GsEsgApi (line 62) | class GsEsgApi:
method get_esg (line 66) | def get_esg(
FILE: gs_quant/api/gs/federated_secmaster.py
class FederatedIdentifiers (line 29) | class FederatedIdentifiers(Enum):
class GsSecurityMasterFederatedApi (line 46) | class GsSecurityMasterFederatedApi:
method get_a_security (line 48) | def get_a_security(cls, id: str, effective_date: dt.date = None) -> Op...
method get_security_identifiers (line 67) | def get_security_identifiers(cls, id: str) -> Optional[dict]:
method get_many_securities (line 80) | def get_many_securities(
method get_securities_data (line 110) | def get_securities_data(
method search_many_securities (line 140) | def search_many_securities(
method search_securities_data (line 171) | def search_securities_data(
method __query_securities (line 202) | def __query_securities(
method __search_securities (line 224) | def __search_securities(
method __prepare_params (line 245) | def __prepare_params(cls, params, effective_date, offset_key, is_prima...
FILE: gs_quant/api/gs/groups.py
class GsGroupsApi (line 23) | class GsGroupsApi:
method get_groups (line 25) | def get_groups(
method create_group (line 61) | def create_group(cls, group: Group) -> Dict:
method get_group (line 65) | def get_group(cls, group_id: str) -> Group:
method update_group (line 69) | def update_group(cls, group_id: str, group: Group) -> Group:
method delete_group (line 78) | def delete_group(cls, group_id: str):
method get_users_in_group (line 82) | def get_users_in_group(cls, group_id: str) -> List:
method add_users_to_group (line 86) | def add_users_to_group(cls, group_id: str, user_ids: List[str]):
method delete_users_from_group (line 90) | def delete_users_from_group(cls, group_id: str, user_ids: List[str]):
FILE: gs_quant/api/gs/hedges.py
class GsHedgeApi (line 29) | class GsHedgeApi:
method get_many_hedges (line 33) | def get_many_hedges(cls, ids: List[str] = None, names: List[str] = Non...
method create_hedge (line 42) | def create_hedge(cls, hedge: Dict) -> Hedge:
method get_hedge (line 46) | def get_hedge(cls, hedge_id: str) -> Hedge:
method get_hedge_data (line 50) | def get_hedge_data(cls, ids: List[str] = None, names: List[str] = None...
method get_hedge_results (line 59) | def get_hedge_results(cls, hedge_id: str, start_date: dt.date = None, ...
method update_hedge (line 68) | def update_hedge(cls, hedge_id: str, hedge: Hedge) -> Hedge:
method delete_hedge (line 72) | def delete_hedge(cls, hedge_id: str):
method construct_performance_hedge_query (line 76) | def construct_performance_hedge_query(
method calculate_hedge (line 192) | def calculate_hedge(cls, hedge_query: dict) -> dict:
method share_hedge_group (line 203) | def share_hedge_group(
FILE: gs_quant/api/gs/indices.py
class GsIndexApi (line 57) | class GsIndexApi:
method create (line 71) | def create(cls, inputs: CreateRequest) -> CreateRepsonse:
method edit (line 77) | def edit(cls, id_: str, inputs: CustomBasketsEditInputs) -> CustomBask...
method rebalance (line 84) | def rebalance(cls, id_: str, inputs: RebalanceRequest) -> RebalanceRes...
method cancel_rebalance (line 92) | def cancel_rebalance(cls, id_: str, inputs: RebalanceCancelRequest) ->...
method last_rebalance_data (line 99) | def last_rebalance_data(cls, id_: str) -> Dict:
method last_rebalance_approval (line 105) | def last_rebalance_approval(cls, id_: str) -> ApprovalCustomBasketResp...
method initial_price (line 111) | def initial_price(cls, id_: str, date: dt.date) -> Dict:
method validate_ticker (line 117) | def validate_ticker(cls, ticker: str):
method backcast (line 123) | def backcast(cls, _id: str, inputs: CustomBasketsBackcastInputs) -> Cu...
method update_risk_reports (line 130) | def update_risk_reports(cls, _id: str, inputs: CustomBasketRiskParams):
method get_positions_data (line 139) | def get_positions_data(
method get_last_positions_data (line 161) | def get_last_positions_data(
FILE: gs_quant/api/gs/monitors.py
class GsMonitorsApi (line 27) | class GsMonitorsApi:
method get_monitors (line 31) | def get_monitors(
method get_monitor (line 60) | def get_monitor(cls, monitor_id: str) -> Monitor:
method create_monitor (line 64) | def create_monitor(cls, monitor: Monitor) -> Monitor:
method update_monitor (line 69) | def update_monitor(cls, monitor: Monitor):
method delete_monitor (line 76) | def delete_monitor(cls, monitor_id: str) -> dict:
method calculate_monitor (line 80) | def calculate_monitor(cls, monitor_id) -> MonitorResponseData:
FILE: gs_quant/api/gs/parser.py
class GsParserApi (line 24) | class GsParserApi:
method get_instrument_from_text_asset_class (line 28) | def get_instrument_from_text_asset_class(cls, text: str, asset_class: ...
method get_instrument_from_text (line 33) | def get_instrument_from_text(cls, text: str) -> dict:
FILE: gs_quant/api/gs/plots.py
class GsPlotApi (line 28) | class GsPlotApi:
method get_many_charts (line 34) | def get_many_charts(cls, limit: int = 100) -> Tuple[Chart, ...]:
method get_many_charts_async (line 38) | async def get_many_charts_async(cls, limit: int = 100) -> Tuple[Chart,...
method get_chart (line 42) | def get_chart(cls, chart_id: str) -> Chart:
method get_chart_async (line 46) | async def get_chart_async(cls, chart_id: str) -> Chart:
method create_chart (line 50) | def create_chart(cls, chart: Chart) -> Chart:
method create_chart_async (line 54) | async def create_chart_async(cls, chart: Chart) -> Chart:
method update_chart (line 58) | def update_chart(cls, chart: Chart):
method update_chart_async (line 62) | async def update_chart_async(cls, chart: Chart):
method delete_chart (line 66) | def delete_chart(cls, chart_id: str) -> dict:
method delete_chart_async (line 70) | async def delete_chart_async(cls, chart_id: str) -> dict:
method _build_plot_payload (line 76) | def _build_plot_payload(
method plot_runner_async (line 104) | async def plot_runner_async(
method plot_runner (line 121) | def plot_runner(
method share_chart (line 138) | def share_chart(cls, chart_id: str, users: Iterable):
method share_chart_async (line 147) | async def share_chart_async(cls, chart_id: str, users: Iterable):
FILE: gs_quant/api/gs/portfolios.py
class GsPortfolioApi (line 40) | class GsPortfolioApi(ApiWithCustomSession):
method get_portfolios (line 46) | def get_portfolios(
method get_portfolio (line 64) | def get_portfolio(cls, portfolio_id: str) -> Portfolio:
method get_portfolio_by_name (line 68) | def get_portfolio_by_name(cls, name: str) -> Portfolio:
method create_portfolio (line 80) | def create_portfolio(cls, portfolio: Portfolio) -> Portfolio:
method update_portfolio (line 84) | def update_portfolio(cls, portfolio: Portfolio):
method delete_portfolio (line 88) | def delete_portfolio(cls, portfolio_id: str) -> dict:
method get_portfolio_analyze (line 93) | def get_portfolio_analyze(cls, portfolio_id: str) -> dict:
method get_positions (line 101) | def get_positions(
method get_positions_for_date (line 114) | def get_positions_for_date(
method get_position_set_by_position_type (line 124) | def get_position_set_by_position_type(
method _unpack_position_set (line 137) | def _unpack_position_set(cls, kvs: dict) -> PositionSet:
method get_instruments_by_position_type (line 146) | def get_instruments_by_position_type(
method get_latest_positions (line 169) | def get_latest_positions(cls, portfolio_id: str, position_type: str = ...
method get_instruments_by_workflow_id (line 181) | def get_instruments_by_workflow_id(
method get_position_dates (line 202) | def get_position_dates(cls, portfolio_id: str) -> Tuple[dt.date, ...]:
method update_positions (line 211) | def update_positions(cls, portfolio_id: str, position_sets: List[Posit...
method get_positions_data (line 218) | def get_positions_data(
method update_quote (line 243) | def update_quote(cls, quote_id: str, request: RiskRequest):
method save_quote (line 247) | def save_quote(cls, request: RiskRequest) -> str:
method update_workflow_quote (line 251) | def update_workflow_quote(cls, quote_id: str, request: SaveQuoteRequest):
method save_workflow_quote (line 258) | def save_workflow_quote(cls, request: SaveQuoteRequest) -> str:
method share_workflow_quote (line 265) | def share_workflow_quote(cls, request: SaveQuoteRequest) -> str:
method get_workflow_quote (line 272) | def get_workflow_quote(cls, workflow_id: str) -> Tuple[WorkflowPositio...
method get_shared_workflow_quote (line 282) | def get_shared_workflow_quote(cls, workflow_id: str) -> Tuple[Workflow...
method save_to_shadowbook (line 292) | def save_to_shadowbook(cls, request: RiskRequest, name: str) -> str:
method get_risk_models_by_coverage (line 296) | def get_risk_models_by_coverage(cls, portfolio_id: str, term: Term = T...
method get_reports (line 302) | def get_reports(cls, portfolio_id: str, tags: Dict) -> Tuple[Report, ....
method schedule_reports (line 312) | def schedule_reports(
method get_schedule_dates (line 337) | def get_schedule_dates(cls, portfolio_id: str, backcast: bool = False)...
method get_custom_aum (line 351) | def get_custom_aum(cls, portfolio_id: str, start_date: dt.date = None,...
method upload_custom_aum (line 364) | def upload_custom_aum(cls, portfolio_id: str, aum_data: List[Dict], cl...
method update_portfolio_tree (line 372) | def update_portfolio_tree(cls, portfolio_id: str):
method get_portfolio_tree (line 376) | def get_portfolio_tree(cls, portfolio_id: str):
method get_attribution (line 380) | def get_attribution(
FILE: gs_quant/api/gs/price.py
class GsPriceApi (line 25) | class GsPriceApi:
method price_positions (line 31) | def price_positions(cls, inputs: PositionSetPriceInput) -> PositionSet...
method price_many_positions (line 36) | def price_many_positions(cls, pricing_request: PositionsPricingRequest...
FILE: gs_quant/api/gs/reports.py
class OrderType (line 34) | class OrderType(EnumBase, Enum):
class FactorRiskTableMode (line 41) | class FactorRiskTableMode(EnumBase, Enum):
class GsReportApi (line 50) | class GsReportApi:
method create_report (line 54) | def create_report(cls, report: Report) -> Report:
method get_report (line 58) | def get_report(cls, report_id: str) -> Report:
method get_reports (line 62) | def get_reports(
method update_report (line 109) | def update_report(cls, report: Report) -> dict:
method delete_report (line 113) | def delete_report(cls, report_id: str) -> dict:
method schedule_report (line 119) | def schedule_report(cls, report_id: str, start_date: dt.date, end_date...
method get_report_status (line 129) | def get_report_status(cls, report_id: str) -> Tuple[dict, ...]:
method get_report_jobs (line 133) | def get_report_jobs(cls, report_id: str) -> Tuple[dict, ...]:
method get_report_job (line 137) | def get_report_job(cls, report_job_id: str) -> dict:
method reschedule_report_job (line 141) | def reschedule_report_job(cls, report_job_id: str):
method cancel_report_job (line 145) | def cancel_report_job(cls, report_job_id: str) -> dict:
method update_report_job (line 149) | def update_report_job(cls, report_job_id: str, status: str) -> dict:
method get_custom_aum (line 156) | def get_custom_aum(cls, report_id: str, start_date: dt.date = None, en...
method upload_custom_aum (line 165) | def upload_custom_aum(cls, report_id: str, aum_data: List[dict], clear...
method get_factor_risk_report_results (line 175) | def get_factor_risk_report_results(
method get_factor_risk_report_view (line 206) | def get_factor_risk_report_view(
method get_factor_risk_report_table (line 239) | def get_factor_risk_report_table(
method get_brinson_attribution_results (line 269) | def get_brinson_attribution_results(
FILE: gs_quant/api/gs/risk.py
class WebsocketUnavailable (line 42) | class WebsocketUnavailable(Exception):
class GsRiskApi (line 46) | class GsRiskApi(RiskApi):
method calc_multi (line 53) | def calc_multi(cls, requests: Iterable[RiskRequest]) -> dict:
method calc (line 63) | def calc(cls, request: RiskRequest) -> Iterable:
method _exec (line 67) | def _exec(cls, request: Union[RiskRequest, Iterable[RiskRequest]]) -> ...
method __url (line 87) | def __url(cls, request: Union[RiskRequest, Iterable[RiskRequest]]):
method get_results (line 92) | async def get_results(
method __get_results_poll (line 108) | async def __get_results_poll(cls, responses: asyncio.Queue, results: a...
method __get_results_ws (line 154) | async def __get_results_ws(cls, responses: asyncio.Queue, results: asy...
method create_pretrade_execution_optimization (line 336) | def create_pretrade_execution_optimization(cls, request: OptimizationR...
method get_pretrade_execution_optimization (line 347) | def get_pretrade_execution_optimization(cls, optimization_id: str, max...
method get_liquidity_and_factor_analysis (line 376) | def get_liquidity_and_factor_analysis(
FILE: gs_quant/api/gs/risk_models.py
class IntradayFactorDataSource (line 40) | class IntradayFactorDataSource(Enum):
class GsRiskModelApi (line 51) | class GsRiskModelApi:
method create_risk_model (line 55) | def create_risk_model(cls, model: RiskModel) -> RiskModel:
method get_risk_model (line 61) | def get_risk_model(cls, model_id: str) -> RiskModel:
method get_risk_models (line 65) | def get_risk_models(
method update_risk_model (line 99) | def update_risk_model(cls, model: RiskModel) -> RiskModel:
method delete_risk_model (line 103) | def delete_risk_model(cls, model_id: str) -> Dict:
method get_risk_model_calendar (line 109) | def get_risk_model_calendar(cls, model_id: str) -> RiskModelCalendar:
method upload_risk_model_calendar (line 113) | def upload_risk_model_calendar(cls, model_id: str, model_calendar: Ris...
method get_risk_model_dates (line 119) | def get_risk_model_dates(
class GsFactorRiskModelApi (line 132) | class GsFactorRiskModelApi(GsRiskModelApi):
method __init__ (line 133) | def __init__(self):
method get_risk_model_factors (line 137) | def get_risk_model_factors(cls, model_id: str) -> Tuple[Factor, ...]:
method create_risk_model_factor (line 141) | def create_risk_model_factor(cls, model_id: str, factor: Factor) -> Fa...
method get_risk_model_factor (line 145) | def get_risk_model_factor(cls, model_id: str, factor_id: str) -> Factor:
method update_risk_model_factor (line 149) | def update_risk_model_factor(cls, model_id: str, factor: Factor) -> Fa...
method delete_risk_model_factor (line 154) | def delete_risk_model_factor(cls, model_id: str, factor_id: str) -> Dict:
method get_risk_model_factor_data (line 160) | def get_risk_model_factor_data(
method get_risk_model_factor_data_intraday (line 190) | def get_risk_model_factor_data_intraday(
method get_risk_model_coverage (line 218) | def get_risk_model_coverage(
method upload_risk_model_data (line 231) | def upload_risk_model_data(
method get_risk_model_data (line 258) | def get_risk_model_data(
FILE: gs_quant/api/gs/scenarios.py
class GsScenarioApi (line 27) | class GsScenarioApi:
method create_scenario (line 31) | def create_scenario(cls, scenario: Scenario) -> Scenario:
method get_scenario (line 35) | def get_scenario(cls, scenario_id: str) -> Scenario:
method get_many_scenarios (line 39) | def get_many_scenarios(
method get_scenario_by_name (line 54) | def get_scenario_by_name(cls, name: str) -> Scenario:
method update_scenario (line 67) | def update_scenario(cls, scenario: Scenario) -> Dict:
method delete_scenario (line 71) | def delete_scenario(cls, scenario_id: str) -> Dict:
method calculate_scenario (line 75) | def calculate_scenario(cls, request: Dict) -> Dict:
class GsFactorScenarioApi (line 79) | class GsFactorScenarioApi(GsScenarioApi):
method __init__ (line 80) | def __init__(self):
method get_many_scenarios (line 84) | def get_many_scenarios(
method calculate_scenario (line 119) | def calculate_scenario(cls, calculation_request: Dict) -> Dict:
FILE: gs_quant/api/gs/screens.py
class GsScreenApi (line 27) | class GsScreenApi:
method get_screens (line 29) | def get_screens(
method get_screen (line 40) | def get_screen(cls, screen_id: str) -> Screen:
method create_screen (line 44) | def create_screen(cls, screen: Screen) -> Screen:
method update_screen (line 48) | def update_screen(cls, screen: Screen) -> Screen:
method delete_screen (line 52) | def delete_screen(cls, screen_id: str) -> str:
method get_filter_options (line 56) | def get_filter_options(cls) -> dict:
method calculate (line 60) | def calculate(cls, payload: AssetScreenerRequest) -> dict:
FILE: gs_quant/api/gs/secmaster.py
class SecMasterIdentifiers (line 35) | class SecMasterIdentifiers(Enum):
function __extend_enum (line 59) | def __extend_enum(base_enum, new_values):
class ExchangeId (line 69) | class ExchangeId(Enum):
class GsSecurityMasterApi (line 91) | class GsSecurityMasterApi:
method get_security (line 93) | def get_security(cls, id_value: str, id_type: SecMasterIdentifiers, ef...
method get_many_securities (line 109) | def get_many_securities(
method get_all_securities (line 150) | def get_all_securities(
method get_security_data (line 201) | def get_security_data(
method get_identifiers (line 219) | def get_identifiers(cls, secmaster_id: str) -> dict:
method get_many_identifiers (line 232) | def get_many_identifiers(cls, ids: Iterable[str], limit=100, xref_form...
method map (line 350) | def map(
method search (line 391) | def search(
method __stringify_boolean (line 422) | def __stringify_boolean(cls, bool_value):
method __fetch_all (line 426) | def __fetch_all(cls, fetch_fn, offset_key, total_batches=None, extract...
method _get_corporate_actions (line 449) | def _get_corporate_actions(cls, id_value: str, id_type: SecMasterIdent...
method get_corporate_actions (line 463) | def get_corporate_actions(
method get_capital_structure (line 484) | def get_capital_structure(
method __capital_structure_aggregate (line 528) | def __capital_structure_aggregate(cls, asset_types_total, results):
method _get_capital_structure (line 547) | def _get_capital_structure(
method prepare_params (line 563) | def prepare_params(cls, params, is_primary, offset_key, type_, effecti...
method _get_deltas (line 574) | def _get_deltas(
method get_deltas (line 602) | def get_deltas(
method get_exchanges (line 635) | def get_exchanges(cls, effective_date: dt.date = None, **query_params:...
method _get_exchanges (line 657) | def _get_exchanges(
method get_exchange_identifiers_history (line 680) | def get_exchange_identifiers_history(cls, gs_exchange_id: str) -> Iter...
method _prepare_string_or_list_param (line 691) | def _prepare_string_or_list_param(cls, value: Union[str, list], param_...
method _prepare_underlyers_params (line 700) | def _prepare_underlyers_params(
method _get_securities_by_underlyers (line 739) | def _get_securities_by_underlyers(
method get_securities_by_underlyers (line 771) | def get_securities_by_underlyers(
FILE: gs_quant/api/gs/thematics.py
class ThematicMeasure (line 25) | class ThematicMeasure(Enum):
method __str__ (line 37) | def __str__(self):
class Region (line 41) | class Region(Enum):
class GsThematicApi (line 51) | class GsThematicApi:
method get_thematics (line 55) | def get_thematics(
FILE: gs_quant/api/gs/users.py
class GsUsersApi (line 42) | class GsUsersApi:
method get_users (line 44) | def get_users(
method get_my_guid (line 65) | def get_my_guid(cls) -> str:
method get_current_user_info (line 69) | def get_current_user_info(cls) -> Dict[str, Any]:
method get_current_app_managers (line 77) | def get_current_app_managers(cls) -> List[str]:
method get_many (line 81) | def get_many(cls, key_type: str, keys: List[str], fields: Optional[Lis...
method search (line 97) | def search(
FILE: gs_quant/api/gs/workspaces.py
class GsWorkspacesMarketsApi (line 31) | class GsWorkspacesMarketsApi:
method get_workspaces (line 35) | def get_workspaces(cls, limit: int = 10, **kwargs) -> Tuple[Workspace,...
method get_workspace (line 41) | def get_workspace(cls, workspace_id: str):
method get_workspace_by_alias (line 45) | def get_workspace_by_alias(cls, alias: str) -> Workspace:
method create_workspace (line 52) | def create_workspace(cls, workspace: Workspace) -> Workspace:
method update_workspace (line 58) | def update_workspace(cls, workspace: Workspace):
method delete_workspace (line 64) | def delete_workspace(cls, workspace_id: str) -> Dict:
method open_workspace (line 68) | def open_workspace(cls, workspace: Workspace):
FILE: gs_quant/api/risk.py
class GenericRiskApi (line 40) | class GenericRiskApi(ApiWithCustomSession, metaclass=ABCMeta):
method populate_pending_futures (line 45) | def populate_pending_futures(
method build_keyed_results (line 51) | def build_keyed_results(
class RiskApi (line 56) | class RiskApi(GenericRiskApi, metaclass=ABCMeta):
method populate_pending_futures (line 60) | def populate_pending_futures(
method get_results (line 92) | async def get_results(
method calc (line 102) | def calc(cls, request: RiskRequest) -> Iterable: ...
method calc_multi (line 105) | def calc_multi(cls, requests: Iterable[RiskRequest]) -> dict:
method __handle_queue_update (line 109) | def __handle_queue_update(cls, q: Union[queue.Queue, asyncio.Queue], f...
method drain_queue (line 129) | def drain_queue(cls, q: queue.Queue, timeout: Optional[int] = None) ->...
method drain_queue_async (line 136) | async def drain_queue_async(cls, q: asyncio.Queue, timeout: Optional[i...
method enqueue (line 144) | def enqueue(
method shutdown_queue_listener (line 165) | def shutdown_queue_listener(
method run (line 174) | def run(
method build_keyed_results (line 347) | def build_keyed_results(
FILE: gs_quant/api/utils.py
function handle_proxy (line 30) | def handle_proxy(url, params):
class ThreadPoolManager (line 48) | class ThreadPoolManager:
method initialize (line 52) | def initialize(cls, max_workers: int):
method run_async (line 56) | def run_async(cls, tasks: List[Callable]) -> List:
method __run (line 73) | def __run(session, data_context, span: Optional[TracingSpan], func):
FILE: gs_quant/backtests/action_handler.py
class ActionHandler (line 25) | class ActionHandler:
method __init__ (line 26) | def __init__(self, action: TAction) -> None:
method action (line 30) | def action(self) -> TAction:
method apply_action (line 34) | def apply_action(
class ActionHandlerBaseFactory (line 46) | class ActionHandlerBaseFactory:
method get_action_handler (line 48) | def get_action_handler(self, action: TAction) -> TActionHandler:
FILE: gs_quant/backtests/actions.py
function default_transaction_cost (line 50) | def default_transaction_cost():
class ScalingActionType (line 54) | class ScalingActionType(Enum):
class Action (line 62) | class Action(object):
method __init_subclass__ (line 71) | def __init_subclass__(cls, **kwargs):
method sub_classes (line 76) | def sub_classes():
method __post_init__ (line 79) | def __post_init__(self):
method calc_type (line 83) | def calc_type(self):
method risk (line 87) | def risk(self):
method set_name (line 90) | def set_name(self, name: str):
method transaction_cost (line 97) | def transaction_cost(self):
method transaction_cost (line 101) | def transaction_cost(self, value):
method transaction_cost_exit (line 105) | def transaction_cost_exit(self):
method transaction_cost_exit (line 109) | def transaction_cost_exit(self, value):
class AddTradeAction (line 118) | class AddTradeAction(Action):
method __post_init__ (line 149) | def __post_init__(self):
method set_dated_priceables (line 166) | def set_dated_priceables(self, state, priceables):
method dated_priceables (line 170) | def dated_priceables(self):
class AddScaledTradeAction (line 184) | class AddScaledTradeAction(Action):
method __post_init__ (line 225) | def __post_init__(self):
class AddWeightedTradeAction (line 242) | class AddWeightedTradeAction(Action):
method __post_init__ (line 279) | def __post_init__(self):
class EnterPositionQuantityScaledAction (line 297) | class EnterPositionQuantityScaledAction(Action):
method __post_init__ (line 332) | def __post_init__(self):
class ExitPositionAction (line 349) | class ExitPositionAction(Action):
class ExitTradeAction (line 356) | class ExitTradeAction(Action):
method __post_init__ (line 364) | def __post_init__(self):
class ExitAllPositionsAction (line 371) | class ExitAllPositionsAction(ExitTradeAction):
method __post_init__ (line 378) | def __post_init__(self):
class HedgeAction (line 385) | class HedgeAction(Action):
method __post_init__ (line 426) | def __post_init__(self):
method priceable (line 463) | def priceable(self):
class RebalanceAction (line 469) | class RebalanceAction(Action):
method __post_init__ (line 483) | def __post_init__(self):
FILE: gs_quant/backtests/backtest_engine.py
class BacktestBaseEngine (line 23) | class BacktestBaseEngine:
method get_action_handler (line 25) | def get_action_handler(self, action: TAction) -> TActionHandler:
FILE: gs_quant/backtests/backtest_objects.py
class BaseBacktest (line 48) | class BaseBacktest(ABC):
class TransactionAggType (line 55) | class TransactionAggType(Enum):
class PnlAttribute (line 63) | class PnlAttribute:
method get_risks (line 70) | def get_risks(self):
class PnlDefinition (line 76) | class PnlDefinition:
method get_risks (line 79) | def get_risks(self):
class BackTest (line 85) | class BackTest(BaseBacktest):
method __post_init__ (line 97) | def __post_init__(self):
method cash_dict (line 114) | def cash_dict(self):
method portfolio_dict (line 118) | def portfolio_dict(self):
method portfolio_dict (line 122) | def portfolio_dict(self, portfolio_dict):
method cash_payments (line 126) | def cash_payments(self):
method cash_payments (line 130) | def cash_payments(self, cash_payments):
method transaction_costs (line 134) | def transaction_costs(self):
method transaction_costs (line 138) | def transaction_costs(self, transaction_costs):
method transaction_cost_entries (line 142) | def transaction_cost_entries(self):
method hedges (line 146) | def hedges(self):
method hedges (line 150) | def hedges(self, hedges):
method weighted_trades (line 154) | def weighted_trades(self):
method weighted_trades (line 158) | def weighted_trades(self, weighted_trades):
method results (line 162) | def results(self):
method set_results (line 165) | def set_results(self, date, results):
method add_results (line 168) | def add_results(self, date, results, replace=False):
method trade_exit_risk_results (line 175) | def trade_exit_risk_results(self):
method calc_calls (line 179) | def calc_calls(self):
method calc_calls (line 183) | def calc_calls(self, calc_calls):
method calculations (line 187) | def calculations(self):
method calculations (line 191) | def calculations(self, calculations):
method get_risk_summary_df (line 194) | def get_risk_summary_df(self, zero_on_empty_dates=False):
method result_summary (line 219) | def result_summary(self):
method risk_summary (line 247) | def risk_summary(self):
method trade_ledger (line 253) | def trade_ledger(self):
method strategy_as_time_series (line 292) | def strategy_as_time_series(self):
method pnl_explain (line 332) | def pnl_explain(self):
method summary_stats (line 381) | def summary_stats(self, annualisation_factor: int = 252) -> pd.Series:
class ScalingPortfolio (line 517) | class ScalingPortfolio:
method __init__ (line 518) | def __init__(
class TransactionModel (line 532) | class TransactionModel:
method get_unit_cost (line 533) | def get_unit_cost(self, state, info, instrument) -> float:
class ConstantTransactionModel (line 539) | class ConstantTransactionModel(TransactionModel):
method get_unit_cost (line 543) | def get_unit_cost(self, state, info, instrument) -> float:
class ScaledTransactionModel (line 549) | class ScaledTransactionModel(TransactionModel):
method get_unit_cost (line 554) | def get_unit_cost(self, state, info, instrument) -> Union[float, Prici...
class AggregateTransactionModel (line 569) | class AggregateTransactionModel(TransactionModel):
method get_unit_cost (line 573) | def get_unit_cost(self, state, info, instrument) -> float:
class TransactionCostEntry (line 586) | class TransactionCostEntry:
method __init__ (line 593) | def __init__(self, date: dt.date, instrument: Instrument, transaction_...
method all_instruments (line 601) | def all_instruments(self) -> Tuple[Instrument, ...]:
method all_transaction_models (line 605) | def all_transaction_models(self):
method cost_aggregation_func (line 613) | def cost_aggregation_func(self) -> Callable:
method additional_scaling (line 624) | def additional_scaling(self):
method additional_scaling (line 628) | def additional_scaling(self, value: float):
method date (line 632) | def date(self):
method date (line 636) | def date(self, value: dt.date):
method no_of_risk_calcs (line 640) | def no_of_risk_calcs(self) -> int:
method calculate_unit_cost (line 649) | def calculate_unit_cost(self):
method __resolved_cost (line 656) | def __resolved_cost(cost: Union[float, PricingFuture]) -> float:
method get_final_cost (line 663) | def get_final_cost(self):
method get_cost_by_component (line 673) | def get_cost_by_component(self) -> Tuple[float, float]:
class CashPayment (line 703) | class CashPayment:
method __init__ (line 704) | def __init__(
method to_frame (line 713) | def to_frame(self):
class Hedge (line 720) | class Hedge:
method __init__ (line 721) | def __init__(
class WeightedScalingPortfolio (line 729) | class WeightedScalingPortfolio:
method __init__ (line 735) | def __init__(
class WeightedTrade (line 751) | class WeightedTrade:
method __init__ (line 757) | def __init__(
class PredefinedAssetBacktest (line 770) | class PredefinedAssetBacktest(BaseBacktest):
method __post_init__ (line 774) | def __post_init__(self):
method set_start_date (line 783) | def set_start_date(self, start: dt.date):
method record_orders (line 787) | def record_orders(self, orders: Iterable[OrderBase]):
method update_fill (line 790) | def update_fill(self, fill: FillEvent):
method trade_ledger (line 795) | def trade_ledger(self):
method mark_to_market (line 852) | def mark_to_market(self, state: dt.datetime, valuation_method: Valuati...
method get_level (line 883) | def get_level(self, date: dt.date) -> float:
method get_costs (line 886) | def get_costs(self) -> pd.Series(dtype=float):
method get_orders_for_date (line 894) | def get_orders_for_date(self, date: dt.date) -> pd.DataFrame():
class CashAccrualModel (line 902) | class CashAccrualModel:
method get_accrued_value (line 905) | def get_accrued_value(self, current_value, to_state) -> dict:
class ConstantCashAccrualModel (line 911) | class ConstantCashAccrualModel(CashAccrualModel):
method get_accrued_value (line 916) | def get_accrued_value(self, current_value, to_state) -> dict:
class DataCashAccrualModel (line 928) | class DataCashAccrualModel(CashAccrualModel):
method get_accrued_value (line 935) | def get_accrued_value(self, current_value, to_state) -> dict:
class OisFixingCashAccrualModel (line 950) | class OisFixingCashAccrualModel(CashAccrualModel):
method get_accrued_value (line 955) | def get_accrued_value(self, current_value, to_state) -> dict:
FILE: gs_quant/backtests/backtest_utils.py
class CalcType (line 32) | class CalcType(Enum):
class CustomDuration (line 40) | class CustomDuration:
method __hash__ (line 44) | def __hash__(self):
function make_list (line 48) | def make_list(thing):
function get_final_date (line 65) | def get_final_date(inst, create_date, duration, holiday_calendar=None, t...
function scale_trade (line 92) | def scale_trade(inst: Instrument, ratio: float):
function map_ccy_name_to_ccy (line 97) | def map_ccy_name_to_ccy(currency_name: Union[str, CurrencyName]):
function interpolate_signal (line 122) | def interpolate_signal(signal: dict[dt.date, float], method=Interpolate....
FILE: gs_quant/backtests/core.py
class TradeInMethod (line 28) | class TradeInMethod(EnumBase, Enum):
class Backtest (line 32) | class Backtest(__Backtest):
method get_results (line 33) | def get_results(self) -> Tuple[BacktestResult, ...]:
class MarketModel (line 39) | class MarketModel(EnumBase, Enum):
class TimeWindow (line 44) | class TimeWindow(NamedTuple):
class ValuationFixingType (line 49) | class ValuationFixingType(EnumBase, Enum):
class ValuationMethod (line 53) | class ValuationMethod(NamedTuple):
FILE: gs_quant/backtests/data_handler.py
class Clock (line 22) | class Clock(object):
method __init__ (line 23) | def __init__(self):
method update (line 27) | def update(self, time: dt.datetime):
method reset (line 38) | def reset(self):
method time_check (line 41) | def time_check(self, state: Union[dt.date, dt.datetime]):
class DataHandler (line 54) | class DataHandler(object):
method __init__ (line 55) | def __init__(self, data_mgr: DataManager, tz: dt.timezone):
method reset_clock (line 60) | def reset_clock(self):
method update (line 63) | def update(self, state: dt.datetime):
method _utc_time (line 66) | def _utc_time(self, state: Union[dt.date, dt.datetime]):
method get_data (line 73) | def get_data(self, state: Union[dt.date, dt.datetime], *key):
method get_data_range (line 77) | def get_data_range(self, start: Union[dt.date, dt.datetime], end: Unio...
FILE: gs_quant/backtests/data_sources.py
class MissingDataStrategy (line 32) | class MissingDataStrategy(Enum):
class DataSource (line 40) | class DataSource:
method __init_subclass__ (line 43) | def __init_subclass__(cls, **kwargs):
method sub_classes (line 48) | def sub_classes():
method get_data (line 51) | def get_data(self, state, **kwargs):
method get_data_range (line 54) | def get_data_range(self, start: Union[dt.date, dt.datetime], end: Unio...
class GsDataSource (line 60) | class GsDataSource(DataSource):
method __post_init__ (line 68) | def __post_init__(self):
method get_data (line 71) | def get_data(self, state: Union[dt.date, dt.datetime] = None, **kwargs):
method get_data_range (line 82) | def get_data_range(self, start: Union[dt.date, dt.datetime], end: Unio...
class GenericDataSource (line 98) | class GenericDataSource(DataSource):
method __eq__ (line 114) | def __eq__(self, other):
method __post_init__ (line 119) | def __post_init__(self):
method get_data (line 122) | def get_data(self, state: Union[dt.date, dt.datetime, Iterable]):
method get_data_range (line 160) | def get_data_range(self, start: Union[dt.date, dt.datetime], end: Unio...
class DataManager (line 176) | class DataManager:
method __post_init__ (line 177) | def __post_init__(self):
method add_data_source (line 180) | def add_data_source(
method get_data (line 198) | def get_data(self, state: Union[dt.date, dt.datetime], instrument: Ins...
method get_data_range (line 206) | def get_data_range(
FILE: gs_quant/backtests/decorator.py
function plot_backtest (line 18) | def plot_backtest():
FILE: gs_quant/backtests/equity_vol_engine.py
function get_backtest_trading_quantity_type (line 59) | def get_backtest_trading_quantity_type(scaling_type, risk):
function is_synthetic_forward (line 73) | def is_synthetic_forward(priceable):
class BacktestResult (line 96) | class BacktestResult:
method __init__ (line 97) | def __init__(self, results):
method get_measure_series (line 100) | def get_measure_series(self, measure: FlowVolBacktestMeasure):
method get_portfolio_history (line 109) | def get_portfolio_history(self):
method get_trade_history (line 122) | def get_trade_history(self):
class EquityVolEngine (line 146) | class EquityVolEngine(object):
method check_strategy (line 148) | def check_strategy(cls, strategy):
method supports_strategy (line 295) | def supports_strategy(cls, strategy):
method run_backtest (line 303) | def run_backtest(cls, strategy, start, end, market_model=EquityMarketM...
method __get_underlier_list (line 404) | def __get_underlier_list(cls, priceables):
method __map_tc_model (line 418) | def __map_tc_model(cls, model: TransactionModel):
class TenorParser (line 437) | class TenorParser(object):
method __init__ (line 441) | def __init__(self, expiry: Union[str, dt.date]):
method get_date (line 444) | def get_date(self):
method get_mode (line 454) | def get_mode(self):
FILE: gs_quant/backtests/event.py
class Event (line 20) | class Event(object):
class MarketEvent (line 24) | class MarketEvent(Event):
method __init__ (line 25) | def __init__(self):
class ValuationEvent (line 29) | class ValuationEvent(Event):
method __init__ (line 30) | def __init__(self):
class OrderEvent (line 34) | class OrderEvent(Event):
method __init__ (line 35) | def __init__(self, order: OrderBase):
class FillEvent (line 40) | class FillEvent(Event):
method __init__ (line 41) | def __init__(self, order: OrderBase, filled_units: float, filled_price...
FILE: gs_quant/backtests/execution_engine.py
class ExecutionEngine (line 24) | class ExecutionEngine(object):
class SimulatedExecutionEngine (line 28) | class SimulatedExecutionEngine(ExecutionEngine):
method __init__ (line 29) | def __init__(self, data_handler: DataHandler):
method submit_order (line 33) | def submit_order(self, order: OrderEvent):
method ping (line 37) | def ping(self, state: dt.datetime):
FILE: gs_quant/backtests/generic_engine.py
function raiser (line 61) | def raiser(ex):
class GenericEngineActionFactory (line 68) | class GenericEngineActionFactory(ActionHandlerBaseFactory):
method __init__ (line 69) | def __init__(self, action_impl_map=None):
method get_action_handler (line 80) | def get_action_handler(self, action: Action) -> ActionHandler:
class GenericEngine (line 86) | class GenericEngine(BacktestBaseEngine):
method __init__ (line 87) | def __init__(self, action_impl_map=None, price_measure=Price):
method get_action_handler (line 94) | def get_action_handler(self, action: Action) -> ActionHandler:
method supports_strategy (line 98) | def supports_strategy(self, strategy):
method new_pricing_context (line 107) | def new_pricing_context(self):
method run_backtest (line 134) | def run_backtest(
method _trace (line 203) | def _trace(self, label: str):
method __run (line 209) | def __run(
method _resolve_initial_portfolio (line 338) | def _resolve_initial_portfolio(
method _build_simple_and_semi_triggers_and_actions (line 372) | def _build_simple_and_semi_triggers_and_actions(self, strategy, backte...
method _price_semi_det_triggers (line 406) | def _price_semi_det_triggers(backtest, risks):
method __ensure_risk_results (line 433) | def __ensure_risk_results(dates, backtest: BackTest, risks):
method _process_triggers_and_actions_for_date (line 453) | def _process_triggers_and_actions_for_date(self, d, strategy, backtest...
method _calc_new_trades (line 616) | def _calc_new_trades(self, backtest, risks):
method _handle_cash (line 647) | def _handle_cash(
FILE: gs_quant/backtests/generic_engine_action_impls.py
class OrderBasedActionImpl (line 59) | class OrderBasedActionImpl(ActionHandler, metaclass=ABCMeta):
method __init__ (line 60) | def __init__(self, action: Action):
method get_base_orders_for_states (line 64) | def get_base_orders_for_states(self, states: Collection[dt.date], **kw...
method get_instrument_final_date (line 74) | def get_instrument_final_date(self, inst: Instrument, order_date: dt.d...
class AddTradeActionImpl (line 78) | class AddTradeActionImpl(OrderBasedActionImpl):
method __init__ (line 79) | def __init__(self, action: AddTradeAction):
method _raise_order (line 82) | def _raise_order(
method apply_action (line 102) | def apply_action(
class AddScaledTradeActionImpl (line 141) | class AddScaledTradeActionImpl(OrderBasedActionImpl):
method __init__ (line 142) | def __init__(self, action: AddScaledTradeAction):
method __portfolio_scaling_for_available_cash (line 149) | def __portfolio_scaling_for_available_cash(
method _nav_scale_orders (line 182) | def _nav_scale_orders(self, orders, price_measure, trigger_infos):
method _scaling_level_for_date (line 258) | def _scaling_level_for_date(self, d: dt.date) -> float:
method _scale_order (line 266) | def _scale_order(self, orders, daily_risk, price_measure, trigger_infos):
method _raise_order (line 279) | def _raise_order(
method apply_action (line 311) | def apply_action(
class HedgeActionImpl (line 355) | class HedgeActionImpl(OrderBasedActionImpl):
method __init__ (line 356) | def __init__(self, action: HedgeAction):
method get_base_orders_for_states (line 359) | def get_base_orders_for_states(self, states: Collection[dt.date], **kw...
method apply_action (line 364) | def apply_action(
class ExitTradeActionImpl (line 427) | class ExitTradeActionImpl(ActionHandler):
method __init__ (line 428) | def __init__(self, action: ExitTradeAction):
method apply_action (line 431) | def apply_action(
class RebalanceActionImpl (line 528) | class RebalanceActionImpl(ActionHandler):
method __init__ (line 529) | def __init__(self, action: RebalanceAction):
method apply_action (line 532) | def apply_action(
class AddWeightedTradeActionImpl (line 588) | class AddWeightedTradeActionImpl(OrderBasedActionImpl):
method __init__ (line 589) | def __init__(self, action: AddWeightedTradeAction):
method get_base_orders_for_states (line 592) | def get_base_orders_for_states(self, states: Collection[dt.date], **kw...
method apply_action (line 597) | def apply_action(
FILE: gs_quant/backtests/order.py
class OrderBase (line 25) | class OrderBase(metaclass=ABCMeta):
method __init__ (line 26) | def __init__(self, instrument: Instrument, quantity: float, generation...
method execution_end_time (line 40) | def execution_end_time(self) -> dt.datetime:
method _execution_price (line 43) | def _execution_price(self, data_handler: DataHandler) -> float:
method execution_price (line 46) | def execution_price(self, data_handler: DataHandler) -> float:
method execution_quantity (line 53) | def execution_quantity(self) -> float:
method execution_notional (line 56) | def execution_notional(self, data_hander: DataHandler) -> float:
method _short_name (line 59) | def _short_name(self) -> str:
method to_dict (line 62) | def to_dict(self, data_hander: DataHandler) -> dict:
class OrderTWAP (line 71) | class OrderTWAP(OrderBase):
method __init__ (line 72) | def __init__(
method execution_end_time (line 82) | def execution_end_time(self) -> dt.datetime:
method _execution_price (line 85) | def _execution_price(self, data_handler: DataHandler) -> float:
method execution_quantity (line 93) | def execution_quantity(self) -> float:
method _short_name (line 96) | def _short_name(self) -> str:
class OrderMarketOnClose (line 100) | class OrderMarketOnClose(OrderBase):
method __init__ (line 101) | def __init__(
method execution_end_time (line 112) | def execution_end_time(self) -> dt.datetime:
method _execution_price (line 115) | def _execution_price(self, data_handler: DataHandler) -> float:
method execution_quantity (line 120) | def execution_quantity(self) -> float:
method _short_name (line 123) | def _short_name(self) -> str:
class OrderCost (line 127) | class OrderCost(OrderBase):
method __init__ (line 128) | def __init__(self, currency: str, quantity: float, source: str, execut...
method execution_end_time (line 136) | def execution_end_time(self) -> dt.datetime:
method _execution_price (line 139) | def _execution_price(self, data_handler: DataHandler) -> float:
method execution_quantity (line 144) | def execution_quantity(self) -> float:
method _short_name (line 147) | def _short_name(self) -> str:
method to_dict (line 150) | def to_dict(self, data_hander: DataHandler) -> dict:
class OrderAtMarket (line 159) | class OrderAtMarket(OrderBase):
method __init__ (line 160) | def __init__(
method execution_end_time (line 171) | def execution_end_time(self) -> dt.datetime:
method _execution_price (line 174) | def _execution_price(self, data_handler: DataHandler) -> float:
method execution_quantity (line 181) | def execution_quantity(self) -> float:
method _short_name (line 184) | def _short_name(self) -> str:
class OrderTwapBTIC (line 188) | class OrderTwapBTIC(OrderTWAP):
method __init__ (line 189) | def __init__(
method _execution_price (line 206) | def _execution_price(self, data_handler: DataHandler) -> float:
method _short_name (line 216) | def _short_name(self) -> str:
FILE: gs_quant/backtests/predefined_asset_engine.py
class AddTradeActionImpl (line 44) | class AddTradeActionImpl(ActionHandler):
method __init__ (line 45) | def __init__(self, action: AddTradeAction):
method generate_orders (line 48) | def generate_orders(self, state: dt.datetime, backtest: PredefinedAsse...
method apply_action (line 74) | def apply_action(self, state: dt.datetime, backtest: PredefinedAssetBa...
class SubmitOrderActionImpl (line 79) | class SubmitOrderActionImpl(ActionHandler):
method __init__ (line 84) | def __init__(self, action: Action):
method apply_action (line 87) | def apply_action(self, state: dt.datetime, backtest: PredefinedAssetBa...
class PredefinedAssetEngineActionFactory (line 91) | class PredefinedAssetEngineActionFactory(ActionHandlerBaseFactory):
method __init__ (line 92) | def __init__(self, action_impl_map=None):
method get_action_handler (line 97) | def get_action_handler(self, action: Action) -> Action:
class PredefinedAssetEngine (line 103) | class PredefinedAssetEngine(BacktestBaseEngine):
method get_action_handler (line 104) | def get_action_handler(self, action: Action) -> Action:
method supports_strategy (line 108) | def supports_strategy(self, strategy):
method __init__ (line 117) | def __init__(
method _eod_valuation_time (line 134) | def _eod_valuation_time(self):
method _timer (line 140) | def _timer(self, strategy, start, end, frequency, states=None):
method _adjust_date (line 181) | def _adjust_date(self, date):
method run_backtest (line 188) | def run_backtest(self, strategy, start, end, frequency="B", states=Non...
method _run (line 219) | def _run(self, strategy, timer, backtest: PredefinedAssetBacktest):
FILE: gs_quant/backtests/strategy.py
function _backtest_engines (line 29) | def _backtest_engines():
class Strategy (line 39) | class Strategy:
method __post_init__ (line 53) | def __post_init__(self):
method get_risks (line 59) | def get_risks(self):
method get_available_engines (line 65) | def get_available_engines(self):
FILE: gs_quant/backtests/strategy_systematic.py
class StrategySystematic (line 63) | class StrategySystematic:
method __init__ (line 68) | def __init__(
method __run_service_based_backtest (line 199) | def __run_service_based_backtest(
method __position_quantity (line 268) | def __position_quantity(self, instrument: dict) -> float:
method backtest (line 275) | def backtest(
FILE: gs_quant/backtests/triggers.py
class TriggerDirection (line 45) | class TriggerDirection(Enum):
class AggType (line 51) | class AggType(Enum):
class TriggerRequirements (line 58) | class TriggerRequirements:
method __init_subclass__ (line 61) | def __init_subclass__(cls, **kwargs):
method sub_classes (line 66) | def sub_classes():
method get_trigger_times (line 69) | def get_trigger_times(self):
method calc_type (line 73) | def calc_type(self):
class TriggerInfo (line 79) | class TriggerInfo(object):
method __eq__ (line 83) | def __eq__(self, other):
method __bool__ (line 86) | def __bool__(self):
function check_barrier (line 90) | def check_barrier(direction, test_value, trigger_level) -> TriggerInfo:
class PeriodicTriggerRequirements (line 105) | class PeriodicTriggerRequirements(TriggerRequirements):
method get_trigger_times (line 115) | def get_trigger_times(self) -> [dt.date]:
method has_triggered (line 122) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
class IntradayTriggerRequirements (line 142) | class IntradayTriggerRequirements(TriggerRequirements):
method __post_init__ (line 148) | def __post_init__(self):
method get_trigger_times (line 156) | def get_trigger_times(self):
method has_triggered (line 159) | def has_triggered(self, state: Union[dt.date, dt.datetime], backtest: ...
class MktTriggerRequirements (line 165) | class MktTriggerRequirements(TriggerRequirements):
method has_triggered (line 173) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
class RiskTriggerRequirements (line 184) | class RiskTriggerRequirements(TriggerRequirements):
method has_triggered (line 191) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
method calc_type (line 205) | def calc_type(self):
class AggregateTriggerRequirements (line 211) | class AggregateTriggerRequirements(TriggerRequirements):
method __setattr__ (line 216) | def __setattr__(self, key, value):
method has_triggered (line 222) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
method calc_type (line 246) | def calc_type(self):
class NotTriggerRequirements (line 261) | class NotTriggerRequirements(TriggerRequirements):
method __setattr__ (line 265) | def __setattr__(self, key, value):
method has_triggered (line 271) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
class DateTriggerRequirements (line 281) | class DateTriggerRequirements(TriggerRequirements):
method __post_init__ (line 289) | def __post_init__(self):
method has_triggered (line 294) | def has_triggered(self, state: Union[dt.date, dt.datetime], backtest: ...
method get_trigger_times (line 315) | def get_trigger_times(self):
class PortfolioTriggerRequirements (line 321) | class PortfolioTriggerRequirements(TriggerRequirements):
method has_triggered (line 327) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
class MeanReversionTriggerRequirements (line 344) | class MeanReversionTriggerRequirements(TriggerRequirements):
method has_triggered (line 354) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
class TradeCountTriggerRequirements (line 381) | class TradeCountTriggerRequirements(TriggerRequirements):
method has_triggered (line 386) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
method calc_type (line 400) | def calc_type(self):
class EventTriggerRequirements (line 406) | class EventTriggerRequirements(TriggerRequirements):
method __post_init__ (line 415) | def __post_init__(self):
method get_trigger_times (line 419) | def get_trigger_times(self) -> [dt.date]:
method has_triggered (line 427) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
method list_events (line 444) | def list_events(currency: str, start=Optional[dt.datetime], end=Option...
class Trigger (line 452) | class Trigger:
method __init_subclass__ (line 459) | def __init_subclass__(cls, **kwargs):
method sub_classes (line 464) | def sub_classes():
method __post_init__ (line 467) | def __post_init__(self):
method has_triggered (line 470) | def has_triggered(self, state: dt.date, backtest: BackTest = None) -> ...
method get_trigger_times (line 481) | def get_trigger_times(self):
method calc_type (line 485) | def calc_type(self):
method risks (line 489) | def risks(self):
class PeriodicTrigger (line 495) | class PeriodicTrigger(Trigger):
class IntradayPeriodicTrigger (line 503) | class IntradayPeriodicTrigger(Trigger):
class MktTrigger (line 510) | class MktTrigger(Trigger):
class StrategyRiskTrigger (line 517) | class StrategyRiskTrigger(Trigger):
method risks (line 522) | def risks(self):
class AggregateTrigger (line 528) | class AggregateTrigger(Trigger):
class NotTrigger (line 535) | class NotTrigger(Trigger):
class DateTrigger (line 542) | class DateTrigger(Trigger):
class PortfolioTrigger (line 549) | class PortfolioTrigger(Trigger):
class MeanReversionTrigger (line 556) | class MeanReversionTrigger(Trigger):
class TradeCountTrigger (line 563) | class TradeCountTrigger(Trigger):
class EventTrigger (line 570) | class EventTrigger(Trigger):
class OrdersGeneratorTrigger (line 577) | class OrdersGeneratorTrigger(Trigger):
method __post_init__ (line 580) | def __post_init__(self):
method get_trigger_times (line 585) | def get_trigger_times(self) -> list:
method generate_orders (line 592) | def generate_orders(self, state: dt.datetime, backtest: PredefinedAsse...
method has_triggered (line 601) | def has_triggered(self, state: dt.datetime, backtest: PredefinedAssetB...
FILE: gs_quant/base.py
function exclude_none (line 63) | def exclude_none(o):
function exclude_always (line 67) | def exclude_always(_o):
function is_iterable (line 71) | def is_iterable(o, t):
function is_instance_or_iterable (line 75) | def is_instance_or_iterable(o, t):
function _get_underscore (line 79) | def _get_underscore(arg):
function _get_is_supported_generic (line 86) | def _get_is_supported_generic(arg):
function handle_camel_case_args (line 95) | def handle_camel_case_args(cls):
function static_field (line 119) | def static_field(val):
class RiskKey (line 127) | class RiskKey(namedtuple('RiskKey', ('provider', 'date', 'market', 'para...
method ex_measure (line 129) | def ex_measure(self):
method ex_historical_diddle (line 142) | def ex_historical_diddle(self):
method fields (line 155) | def fields(self):
class EnumBase (line 159) | class EnumBase:
method _missing_ (line 161) | def _missing_(cls: EnumMeta, key):
method __reduce_ex__ (line 166) | def __reduce_ex__(self, protocol):
method __lt__ (line 169) | def __lt__(self: EnumMeta, other):
method __repr__ (line 172) | def __repr__(self):
method __str__ (line 175) | def __str__(self):
class HashableDict (line 179) | class HashableDict(dict):
method hashables (line 181) | def hashables(in_dict) -> Tuple:
method __hash__ (line 190) | def __hash__(self):
class DictBase (line 194) | class DictBase(HashableDict):
method __init__ (line 197) | def __init__(self, *args, **kwargs):
method __getitem__ (line 207) | def __getitem__(self, item):
method __setitem__ (line 210) | def __setitem__(self, key, value):
method __getattr__ (line 214) | def __getattr__(self, item):
method __setattr__ (line 223) | def __setattr__(self, key, value):
method properties (line 232) | def properties(cls) -> set:
class Base (line 236) | class Base(ABC):
method __getattr__ (line 242) | def __getattr__(self, item):
method __setattr__ (line 258) | def __setattr__(self, key, value):
method __repr__ (line 273) | def __repr__(self):
method __is_type_match (line 280) | def __is_type_match(cls, tp, val):
method __coerce_value (line 314) | def __coerce_value(cls, typ: type, value):
method _fields_by_name (line 332) | def _fields_by_name(cls) -> Mapping[str, Field]:
method _field_mappings (line 342) | def _field_mappings(cls) -> Mapping[str, str]:
method clone (line 358) | def clone(self, **kwargs):
method properties (line 376) | def properties(cls) -> set:
method properties_init (line 381) | def properties_init(cls) -> set:
method as_dict (line 385) | def as_dict(self, as_camel_case: bool = False) -> dict:
method default_instance (line 407) | def default_instance(cls):
method from_instance (line 414) | def from_instance(self, instance):
class Priceable (line 430) | class Priceable(Base):
method resolve (line 431) | def resolve(self, in_place: bool = True):
method dollar_price (line 451) | def dollar_price(self):
method price (line 482) | def price(self):
method calc (line 497) | def calc(self, risk_measure, fn=None):
class __ScenarioMeta (line 541) | class __ScenarioMeta(ABCMeta, ContextMeta):
class Scenario (line 546) | class Scenario(Base, ContextBase, ABC, metaclass=__ScenarioMeta):
method __lt__ (line 547) | def __lt__(self, other):
method __repr__ (line 552) | def __repr__(self):
class RiskMeasureParameter (line 565) | class RiskMeasureParameter(Base, ABC):
method __repr__ (line 566) | def __repr__(self):
class InstrumentBase (line 577) | class InstrumentBase(Base, ABC):
method provider (line 582) | def provider(self): ...
method instrument_quantity (line 585) | def instrument_quantity(self) -> float:
method resolution_key (line 589) | def resolution_key(self) -> Optional[RiskKey]:
method unresolved (line 596) | def unresolved(self):
method metadata (line 603) | def metadata(self):
method metadata (line 610) | def metadata(self, value):
method from_instance (line 613) | def from_instance(self, instance):
method resolved (line 619) | def resolved(self, values: dict, resolution_key: RiskKey):
method clone (line 628) | def clone(self, **kwargs):
class Market (line 637) | class Market(ABC):
method __hash__ (line 638) | def __hash__(self):
method __eq__ (line 641) | def __eq__(self, other):
method __lt__ (line 644) | def __lt__(self, other):
method market (line 649) | def market(self): ...
method location (line 653) | def location(self): ...
method to_dict (line 655) | def to_dict(self):
class Sentinel (line 659) | class Sentinel:
method __init__ (line 660) | def __init__(self, name: str):
method __eq__ (line 663) | def __eq__(self, other):
class QuoteReport (line 668) | class QuoteReport(Base, ABC):
class CustomComments (line 673) | class CustomComments(Base, ABC):
function get_enum_value (line 677) | def get_enum_value(enum_type: EnumMeta, value: Union[EnumBase, str]):
class MarketDataScenario (line 696) | class MarketDataScenario(Base):
FILE: gs_quant/common.py
class PositionType (line 28) | class PositionType(Enum):
class DateLimit (line 40) | class DateLimit(Enum):
class PayReceive (line 46) | class PayReceive(EnumBase, Enum):
method _missing_ (line 54) | def _missing_(cls, key):
class RiskMeasure (line 61) | class RiskMeasure(__RiskMeasure):
method __lt__ (line 62) | def __lt__(self, other):
method __repr__ (line 76) | def __repr__(self):
method pricing_context (line 80) | def pricing_context(self):
class ParameterisedRiskMeasure (line 86) | class ParameterisedRiskMeasure(RiskMeasure):
method __init__ (line 87) | def __init__(
method __repr__ (line 103) | def __repr__(self):
method parameter_is_empty (line 115) | def parameter_is_empty(self):
FILE: gs_quant/config/options.py
class DisplayOptions (line 18) | class DisplayOptions:
method __init__ (line 23) | def __init__(self, show_na: bool = False):
method show_na (line 27) | def show_na(self):
method show_na (line 31) | def show_na(self, show_na):
FILE: gs_quant/content/events/00_gsquant_meets_markets/02_optimizing_equity_trading/qes_utils.py
function persistXls (line 9) | def persistXls(xls_report, path, filename, merge_cells=False, indentifie...
function plotGross (line 23) | def plotGross(intraday, color_pal='Blues_r'):
function plotCost (line 34) | def plotCost(intraday):
function plotVar (line 54) | def plotVar(intraday):
function plotBuySellNet (line 71) | def plotBuySellNet(intraday):
function plotGrossRemaining (line 83) | def plotGrossRemaining(intraday):
function plotMultiStrategyPortfolioLevelAnalytics (line 95) | def plotMultiStrategyPortfolioLevelAnalytics(results_dict_multi, metrics...
FILE: gs_quant/content/reports_and_screens/00_fx/vol_screen_app.py
function format_df (line 19) | def format_df(data_dict):
function volatility_screen (line 25) | def volatility_screen(crosses, start_date, end_date, tenor='3m', plot=Tr...
FILE: gs_quant/context_base.py
class ContextMeta (line 24) | class ContextMeta(type):
method __path_key (line 26) | def __path_key(cls) -> str:
method __default_key (line 30) | def __default_key(cls) -> str:
method default_value (line 34) | def default_value(mcs) -> object:
method path (line 38) | def path(cls) -> tuple:
method current (line 42) | def current(cls):
method current (line 54) | def current(cls, current):
method current_is_set (line 70) | def current_is_set(cls) -> bool:
method __default (line 74) | def __default(cls):
method prior (line 84) | def prior(cls):
method has_prior (line 92) | def has_prior(cls):
method push (line 96) | def push(cls, context):
method pop (line 99) | def pop(cls):
class ContextBase (line 105) | class ContextBase(metaclass=ContextMeta):
method __enter__ (line 106) | def __enter__(self):
method __exit__ (line 112) | def __exit__(self, exc_type, exc_val, exc_tb):
method __aenter__ (line 119) | async def __aenter__(self):
method __aexit__ (line 125) | async def __aexit__(self, exc_type, exc_val, exc_tb):
method __entered_key (line 133) | def __entered_key(self) -> str:
method _cls (line 137) | def _cls(self) -> ContextMeta:
method is_entered (line 155) | def is_entered(self) -> bool:
method _on_enter (line 158) | def _on_enter(self):
method _on_exit (line 161) | def _on_exit(self, exc_type, exc_val, exc_tb):
method _on_aenter (line 164) | async def _on_aenter(self):
method _on_aexit (line 167) | async def _on_aexit(self, exc_type, exc_val, exc_tb):
class ContextBaseWithDefault (line 171) | class ContextBaseWithDefault(ContextBase):
method default_value (line 173) | def default_value(cls) -> object:
class nullcontext (line 182) | class nullcontext(AbstractContextManager):
method __init__ (line 183) | def __init__(self, enter_result=None):
method __enter__ (line 186) | def __enter__(self):
method __exit__ (line 189) | def __exit__(self, exc_type, exc_val, exc_tb):
FILE: gs_quant/data/coordinate.py
class BaseDataCoordinate (line 34) | class BaseDataCoordinate(metaclass=ABCMeta):
method __init__ (line 39) | def __init__(self, measure: Union[DataMeasure, str], dimensions: Optio...
method measure (line 50) | def measure(self) -> DataMeasure:
method dimensions (line 54) | def dimensions(self) -> Dict:
method get_series (line 57) | def get_series(self, start: Optional[DateOrDatetime] = None, end: Opti...
method set_dimensions (line 60) | def set_dimensions(self, dimensions: DataDimensions):
class DataCoordinate (line 75) | class DataCoordinate(BaseDataCoordinate):
method __init__ (line 80) | def __init__(
method dataset_id (line 110) | def dataset_id(self) -> str:
method frequency (line 114) | def frequency(self) -> DataFrequency:
method id (line 118) | def id(self) -> str:
method id (line 122) | def id(self, value):
method __eq__ (line 125) | def __eq__(self, other):
method get_dimensions (line 139) | def get_dimensions(self) -> Tuple:
method __hash__ (line 142) | def __hash__(self):
method __str__ (line 145) | def __str__(self):
method get_range (line 152) | def get_range(
method get_series (line 171) | def get_series(
method last_value (line 192) | def last_value(self, before: Optional[DateOrDatetime] = None) -> Union...
method as_dict (line 209) | def as_dict(self):
method from_dict (line 230) | def from_dict(cls, obj):
FILE: gs_quant/data/core.py
function _now (line 25) | def _now():
class DataFrequency (line 29) | class DataFrequency(Enum):
class DataAggregationOperator (line 46) | class DataAggregationOperator:
class IntervalFrequency (line 53) | class IntervalFrequency(Enum):
class DataContext (line 60) | class DataContext(ContextBaseWithDefault):
method __init__ (line 61) | def __init__(self, start=None, end=None, interval=None):
method _get_date (line 76) | def _get_date(o, default):
method _get_datetime (line 92) | def _get_datetime(o, default):
method start_date (line 106) | def start_date(self):
method end_date (line 110) | def end_date(self):
method start_time (line 114) | def start_time(self):
method end_time (line 118) | def end_time(self):
method interval (line 122) | def interval(self):
FILE: gs_quant/data/dataset.py
class InvalidInputException (line 47) | class InvalidInputException(Exception):
class Dataset (line 51) | class Dataset:
class Vendor (line 54) | class Vendor(Enum):
class GS (line 57) | class GS(Vendor):
class TR (line 87) | class TR(Vendor):
class FRED (line 92) | class FRED(Vendor):
class TradingEconomics (line 95) | class TradingEconomics(Vendor):
method __init__ (line 98) | def __init__(self, dataset_id: Union[str, Vendor], provider: Optional[...
method _get_dataset_id_str (line 107) | def _get_dataset_id_str(self, dataset_id):
method id (line 111) | def id(self) -> str:
method name (line 118) | def name(self):
method provider (line 122) | def provider(self):
method _build_data_query (line 127) | def _build_data_query(
method _build_data_frame (line 159) | def _build_data_frame(self, data, schema_varies, standard_fields) -> p...
method get_data (line 170) | def get_data(
method get_data_async (line 208) | async def get_data_async(
method _build_data_series_query (line 246) | def _build_data_series_query(
method _build_data_series (line 266) | def _build_data_series(self, data, field_value, symbol_dimension, stan...
method get_data_series (line 282) | def get_data_series(
method get_data_series_async (line 321) | async def get_data_series_async(
method get_data_last (line 360) | def get_data_last(
method get_coverage (line 392) | def get_coverage(
method get_coverage_async (line 422) | async def get_coverage_async(
method delete (line 452) | def delete(self) -> Dict:
method undelete (line 465) | def undelete(self) -> Dict:
method delete_data (line 478) | def delete_data(self, delete_query: Dict):
method upload_data (line 493) | def upload_data(self, data: Union[pd.DataFrame, list, tuple]) -> Dict:
method get_data_bulk (line 520) | def get_data_bulk(
class PTPDataset (line 615) | class PTPDataset(Dataset):
method __init__ (line 640) | def __init__(self, series: Union[pd.Series, pd.DataFrame], name: Optio...
method sync (line 654) | def sync(self):
method plot (line 670) | def plot(self, open_in_browser: bool = True, field: Optional[str] = No...
class MarqueeDataIngestionLibrary (line 694) | class MarqueeDataIngestionLibrary:
method __init__ (line 713) | def __init__(self, provider: Optional[DataApi] = None):
method provider (line 722) | def provider(self):
method _create_parameters (line 727) | def _create_parameters(
method _check_and_create_field (line 743) | def _check_and_create_field(self, fieldMap: Dict[str, str], dataframe:...
method _create_dimensions (line 758) | def _create_dimensions(
method to_upper_underscore (line 814) | def to_upper_underscore(self, name: str) -> str:
method to_camel_case (line 817) | def to_camel_case(self, name: str) -> str:
method create_dataset (line 820) | def create_dataset(
method write_data (line 894) | def write_data(self, df: pd.DataFrame, dataset_id: str) -> None:
FILE: gs_quant/data/fields.py
class DataMeasure (line 23) | class DataMeasure(Enum):
method __repr__ (line 86) | def __repr__(self):
method list_fundamentals (line 90) | def list_fundamentals(cls):
class DataDimension (line 121) | class DataDimension(Enum):
class Fields (line 139) | class Fields(Enum):
method unit (line 147) | def unit(self) -> Optional[str]:
class AssetMeasure (line 161) | class AssetMeasure:
FILE: gs_quant/data/log.py
function log_debug (line 20) | def log_debug(request_id, logger, fmt_str, *args, **kwargs):
function log_warning (line 24) | def log_warning(request_id, logger, fmt_str, *args, **kwargs):
function log_info (line 28) | def log_info(request_id, logger, fmt_str, *args, **kwargs):
FILE: gs_quant/data/query.py
class DataQueryType (line 28) | class DataQueryType(Enum):
class DataQuery (line 33) | class DataQuery:
method __init__ (line 36) | def __init__(
method get_series (line 50) | def get_series(self) -> Union[pd.Series, None]:
method get_data_series (line 59) | def get_data_series(self) -> DataSeries:
method get_range_string (line 62) | def get_range_string(self) -> str:
FILE: gs_quant/data/stream.py
class DataSeries (line 25) | class DataSeries:
method __init__ (line 28) | def __init__(self, series: pd.Series, coordinate: DataCoordinate):
class DataEvent (line 33) | class DataEvent:
method __init__ (line 36) | def __init__(self, time: dt.datetime, value: Union[None, str, float], ...
FILE: gs_quant/data/utilities.py
class Utilities (line 31) | class Utilities:
class AssetApi (line 32) | class AssetApi:
method __create_query (line 36) | def __create_query(
method get_many_assets_data (line 65) | def get_many_assets_data(
method target_folder (line 73) | def target_folder():
method pre_checks (line 91) | def pre_checks(final_end, original_start, time_field, datetime_delta_o...
method batch (line 123) | def batch(iterable, n=1):
method fetch_data (line 129) | def fetch_data(dataset, symbols, start=dt.datetime.now(), end=dt.datet...
method execute_parallel_query (line 139) | def execute_parallel_query(
method get_dataset_parameter (line 164) | def get_dataset_parameter(dataset):
method write_consolidated_results (line 174) | def write_consolidated_results(
method iterate_over_series (line 186) | def iterate_over_series(
method extract_xref (line 235) | def extract_xref(assets, out_type):
method map_identifiers (line 240) | def map_identifiers(input_type: str, output_type: str, ids, as_of=dt.d...
method get_dataset_coverage (line 260) | def get_dataset_coverage(identifier, symbol_dimension, dataset):
class SecmasterXrefFormatter (line 273) | class SecmasterXrefFormatter:
class EventType (line 274) | class EventType(Enum):
class Event (line 279) | class Event:
method __post_init__ (line 284) | def __post_init__(self):
method convert (line 293) | def convert(data: Dict[str, Any]) -> Dict[str, Dict[str, List[Dict[str...
method _convert_entity_records (line 301) | def _convert_entity_records(records: List[Dict[str, Any]]) -> List[Dic...
method _create_events (line 329) | def _create_events(records: List[Dict[str, Any]]) -> List[Event]:
method _process_events (line 356) | def _process_events(events: List[Event]) -> List[Dict[str, Any]]:
method _date_sort_key (line 430) | def _date_sort_key(date_str: str) -> dt.datetime:
method _add_one_day (line 436) | def _add_one_day(date_str: str) -> str:
method _subtract_one_day (line 451) | def _subtract_one_day(date_str: str) -> str:
FILE: gs_quant/datetime/date.py
class PaymentFrequency (line 38) | class PaymentFrequency(IntEnum):
class DayCountConvention (line 56) | class DayCountConvention(Enum):
function is_business_day (line 83) | def is_business_day(
function business_day_offset (line 105) | def business_day_offset(
function prev_business_date (line 132) | def prev_business_date(
function business_day_count (line 151) | def business_day_count(
function date_range (line 177) | def date_range(
function today (line 230) | def today(location: Optional[PricingLocation] = None) -> dt.date:
function has_feb_29 (line 242) | def has_feb_29(start: dt.date, end: dt.date):
function day_count_fraction (line 270) | def day_count_fraction(
FILE: gs_quant/datetime/gscalendar.py
function _split_list (line 37) | def _split_list(items, predicate) -> Tuple[Tuple[str, ...], Tuple[str, ....
class GsCalendar (line 49) | class GsCalendar:
method __init__ (line 54) | def __init__(self, calendars: Union[str, PricingLocation, Currency, Tu...
method get (line 64) | def get(calendars: Union[str, Tuple], skip_valid_check=True):
method reset (line 68) | def reset():
method calendars (line 71) | def calendars(self) -> Tuple:
method is_currency (line 75) | def is_currency(currency: Union[str, PricingLocation, Currency]) -> bool:
method _get_dataset_coverage (line 87) | def _get_dataset_coverage(self, dataset: Dataset, query_key: str):
method holidays_from_dataset (line 92) | def holidays_from_dataset(self, dataset: Dataset, query_key: str, quer...
method holidays (line 114) | def holidays(self) -> Tuple[dt.date, ...]:
method business_day_calendar (line 121) | def business_day_calendar(self, week_mask: str = None) -> np.busdaycal...
FILE: gs_quant/datetime/point.py
function relative_date_add (line 98) | def relative_date_add(date_rule: str, strict: bool = False) -> float:
function point_sort_order (line 125) | def point_sort_order(point: str, ref_date: Optional[dt.date] = None) -> ...
FILE: gs_quant/datetime/relative_date.py
class RelativeDate (line 34) | class RelativeDate:
method __init__ (line 60) | def __init__(self, rule: str, base_date: Optional[dt.date] = None):
method apply_rule (line 75) | def apply_rule(
method _get_rules (line 111) | def _get_rules(self) -> List[str]:
method __handle_rule (line 135) | def __handle_rule(
method as_dict (line 190) | def as_dict(self):
class RelativeDateSchedule (line 197) | class RelativeDateSchedule:
method __init__ (line 219) | def __init__(self, rule: str, base_date: Optional[dt.date] = None, end...
method apply_rule (line 234) | def apply_rule(
method as_dict (line 269) | def as_dict(self):
FILE: gs_quant/datetime/rules.py
class RDateRule (line 35) | class RDateRule(ABC):
method __init__ (line 44) | def __init__(self, result: dt.date, **params):
method handle (line 57) | def handle(self) -> dt.date:
method _get_holidays (line 64) | def _get_holidays(self) -> List[dt.date]:
method _apply_business_days_logic (line 90) | def _apply_business_days_logic(self, holidays: List[dt.date], offset: ...
method _get_nth_day_of_month (line 99) | def _get_nth_day_of_month(self, calendar_day):
method add_years (line 106) | def add_years(self, holidays: List[dt.date]):
method is_weekend (line 113) | def is_weekend(d: dt.date):
method roll_convention (line 116) | def roll_convention(self, default=None):
class ARule (line 120) | class ARule(RDateRule):
method handle (line 121) | def handle(self) -> dt.date:
class bRule (line 126) | class bRule(RDateRule):
method handle (line 127) | def handle(self) -> dt.date:
class dRule (line 133) | class dRule(RDateRule):
method handle (line 134) | def handle(self) -> dt.date:
class eRule (line 138) | class eRule(RDateRule):
method handle (line 139) | def handle(self) -> dt.date:
class FRule (line 144) | class FRule(RDateRule):
method handle (line 145) | def handle(self) -> dt.date:
class gRule (line 149) | class gRule(RDateRule):
method handle (line 150) | def handle(self) -> dt.date:
class NRule (line 156) | class NRule(RDateRule):
method handle (line 157) | def handle(self) -> dt.date:
class GRule (line 161) | class GRule(RDateRule):
method handle (line 162) | def handle(self) -> dt.date:
class IRule (line 166) | class IRule(RDateRule):
method handle (line 167) | def handle(self) -> dt.date:
class JRule (line 171) | class JRule(RDateRule):
method handle (line 172) | def handle(self) -> dt.date:
class kRule (line 176) | class kRule(RDateRule):
method handle (line 177) | def handle(self) -> dt.date:
class mRule (line 185) | class mRule(RDateRule):
method handle (line 186) | def handle(self) -> dt.date:
class MRule (line 191) | class MRule(RDateRule):
method handle (line 192) | def handle(self) -> dt.date:
class PRule (line 196) | class PRule(RDateRule):
method handle (line 197) | def handle(self) -> dt.date:
class rRule (line 201) | class rRule(RDateRule):
method handle (line 202) | def handle(self) -> dt.date:
class RRule (line 206) | class RRule(RDateRule):
method handle (line 207) | def handle(self) -> dt.date:
class SRule (line 211) | class SRule(RDateRule):
method handle (line 212) | def handle(self) -> dt.date:
class TRule (line 216) | class TRule(RDateRule):
method handle (line 217) | def handle(self) -> dt.date:
class uRule (line 221) | class uRule(RDateRule):
method handle (line 222) | def handle(self) -> dt.date:
class URule (line 228) | class URule(RDateRule):
method handle (line 229) | def handle(self) -> dt.date:
class vRule (line 233) | class vRule(RDateRule):
method handle (line 234) | def handle(self) -> dt.date:
class VRule (line 242) | class VRule(RDateRule):
method handle (line 243) | def handle(self) -> dt.date:
class WRule (line 247) | class WRule(RDateRule):
method handle (line 248) | def handle(self) -> dt.date:
class wRule (line 252) | class wRule(RDateRule):
method handle (line 253) | def handle(self) -> dt.date:
class xRule (line 260) | class xRule(RDateRule):
method handle (line 261) | def handle(self) -> dt.date:
class XRule (line 268) | class XRule(RDateRule):
method handle (line 269) | def handle(self) -> dt.date:
class yRule (line 273) | class yRule(RDateRule):
method handle (line 274) | def handle(self) -> dt.date:
class ZRule (line 282) | class ZRule(RDateRule):
method handle (line 283) | def handle(self) -> dt.date:
FILE: gs_quant/datetime/time.py
class Timer (line 43) | class Timer:
method __init__ (line 44) | def __init__(self, print_on_exit: bool = True, label: str = 'Execution...
method __enter__ (line 49) | def __enter__(self):
method __exit__ (line 52) | def __exit__(self, *args):
function to_zulu_string (line 62) | def to_zulu_string(time: dt.datetime):
function time_difference_as_string (line 66) | def time_difference_as_string(time_delta: np.timedelta64, resolution: st...
FILE: gs_quant/entities/entitlements.py
class User (line 32) | class User:
method __init__ (line 33) | def __init__(self, user_id: str, name: str = None, email: str = None, ...
method __eq__ (line 39) | def __eq__(self, other):
method __hash__ (line 42) | def __hash__(self):
method id (line 46) | def id(self):
method email (line 50) | def email(self):
method name (line 54) | def name(self):
method company (line 58) | def company(self):
method get (line 62) | def get(cls, user_id: str = None, name: str = None, email: str = None):
method get_many (line 86) | def get_many(
method save (line 115) | def save(self):
class Group (line 119) | class Group:
method __init__ (line 120) | def __init__(self, group_id: str, name: str, entitlements=None, descri...
method __eq__ (line 127) | def __eq__(self, other):
method __hash__ (line 130) | def __hash__(self):
method id (line 134) | def id(self):
method name (line 138) | def name(self):
method name (line 142) | def name(self, value: str):
method entitlements (line 146) | def entitlements(self):
method entitlements (line 150) | def entitlements(self, value):
method description (line 154) | def description(self):
method description (line 158) | def description(self, value: str):
method tags (line 162) | def tags(self):
method tags (line 166) | def tags(self, value: List):
method get (line 170) | def get(cls, group_id: str):
method get_many (line 192) | def get_many(cls, group_ids: List[str] = None, names: List[str] = None):
method save (line 219) | def save(self):
method _group_exists (line 241) | def _group_exists(self):
method delete (line 251) | def delete(self):
method get_users (line 258) | def get_users(self) -> List[User]:
method add_users (line 268) | def add_users(self, users: List[User]):
method delete_users (line 277) | def delete_users(self, users: List[User]):
method to_dict (line 286) | def to_dict(self):
method to_target (line 298) | def to_target(self):
class EntitlementBlock (line 311) | class EntitlementBlock:
method __init__ (line 312) | def __init__(
method __eq__ (line 324) | def __eq__(self, other) -> bool:
method users (line 334) | def users(self):
method users (line 338) | def users(self, value: List[User]):
method groups (line 342) | def groups(self):
method groups (line 346) | def groups(self, value: List[Group]):
method roles (line 350) | def roles(self):
method roles (line 354) | def roles(self, value: List[str]):
method unconverted_tokens (line 358) | def unconverted_tokens(self) -> List[str]:
method is_empty (line 361) | def is_empty(self):
method to_list (line 364) | def to_list(self, as_dicts: bool = False, action: str = None, include_...
class Entitlements (line 384) | class Entitlements:
method __init__ (line 385) | def __init__(
method __eq__ (line 411) | def __eq__(self, other) -> bool:
method admin (line 433) | def admin(self):
method admin (line 437) | def admin(self, value: EntitlementBlock):
method delete (line 441) | def delete(self):
method delete (line 445) | def delete(self, value: EntitlementBlock):
method display (line 449) | def display(self):
method display (line 453) | def display(self, value: EntitlementBlock):
method upload (line 457) | def upload(self):
method upload (line 461) | def upload(self, value: EntitlementBlock):
method edit (line 465) | def edit(self):
method edit (line 469) | def edit(self, value: EntitlementBlock):
method execute (line 473) | def execute(self):
method execute (line 477) | def execute(self, value: EntitlementBlock):
method plot (line 481) | def plot(self):
method plot (line 485) | def plot(self, value: EntitlementBlock):
method query (line 489) | def query(self):
method query (line 493) | def query(self, value: EntitlementBlock):
method rebalance (line 497) | def rebalance(self):
method rebalance (line 501) | def rebalance(self, value: EntitlementBlock):
method trade (line 505) | def trade(self):
method trade (line 509) | def trade(self, value: EntitlementBlock):
method view (line 513) | def view(self):
method view (line 517) | def view(self, value: EntitlementBlock):
method to_target (line 520) | def to_target(self, include_all_tokens: bool = False) -> TargetEntitle...
method to_dict (line 550) | def to_dict(self) -> Dict:
method to_frame (line 557) | def to_frame(self) -> pd.DataFrame:
method from_target (line 573) | def from_target(cls, entitlements: TargetEntitlements):
method from_dict (line 583) | def from_dict(cls, entitlements: Dict):
FILE: gs_quant/entities/entity.py
class EntityType (line 73) | class EntityType(Enum):
class EntityKey (line 88) | class EntityKey:
class EntityIdentifier (line 93) | class EntityIdentifier(Enum):
class ScenarioCalculationType (line 97) | class ScenarioCalculationType(Enum):
class ScenarioCalculationMeasure (line 101) | class ScenarioCalculationMeasure(Enum):
class Entity (line 110) | class Entity(metaclass=ABCMeta):
method __init__ (line 123) | def __init__(self, id_: str, entity_type: EntityType, entity: Optional...
method data_dimension (line 130) | def data_dimension(self) -> str:
method entity_type (line 135) | def entity_type(cls) -> EntityType:
method get (line 139) | def get(
method _get_entity_from_type (line 164) | def _get_entity_from_type(cls, entity: Dict, entity_type: EntityType =...
method get_marquee_id (line 176) | def get_marquee_id(self) -> str:
method get_entity (line 179) | def get_entity(self) -> Optional[Dict]:
method get_unique_entity_key (line 182) | def get_unique_entity_key(self) -> EntityKey:
method get_data_coordinate (line 185) | def get_data_coordinate(
method get_entitlements (line 207) | def get_entitlements(self):
class Country (line 214) | class Country(Entity):
class Identifier (line 215) | class Identifier(EntityIdentifier):
method __init__ (line 219) | def __init__(self, id_: str, entity: Optional[Dict] = None):
method data_dimension (line 223) | def data_dimension(self) -> str:
method entity_type (line 227) | def entity_type(cls) -> EntityType:
method get_by_identifier (line 231) | def get_by_identifier(cls, id_value: str, id_type: Identifier) -> Opti...
method get_name (line 234) | def get_name(self) -> Optional[str]:
method get_region (line 237) | def get_region(self) -> Optional[str]:
method get_sub_region (line 240) | def get_sub_region(self):
method get_region_code (line 243) | def get_region_code(self):
method get_sub_region_code (line 246) | def get_sub_region_code(self):
method get_alpha3 (line 249) | def get_alpha3(self):
method get_bbid (line 252) | def get_bbid(self):
method get_alpha2 (line 255) | def get_alpha2(self):
method get_country_code (line 258) | def get_country_code(self):
class Subdivision (line 262) | class Subdivision(Entity):
class Identifier (line 263) | class Identifier(EntityIdentifier):
method __init__ (line 267) | def __init__(self, id_: str, entity: Optional[Dict] = None):
method data_dimension (line 271) | def data_dimension(self) -> str:
method entity_type (line 275) | def entity_type(cls) -> EntityType:
method get_by_identifier (line 279) | def get_by_identifier(cls, id_value: str, id_type: Identifier) -> Opti...
method get_name (line 282) | def get_name(self) -> Optional[str]:
class KPI (line 286) | class KPI(Entity):
class Identifier (line 287) | class Identifier(EntityIdentifier):
method __init__ (line 291) | def __init__(self, id_: str, entity: Optional[Dict] = None):
method data_dimension (line 295) | def data_dimension(self) -> str:
method entity_type (line 299) | def entity_type(cls) -> EntityType:
method get_by_identifier (line 303) | def get_by_identifier(cls, id_value: str, id_type: Identifier) -> Opti...
method get_name (line 306) | def get_name(self) -> Optional[str]:
method get_category (line 309) | def get_category(self) -> Optional[str]:
method get_sub_category (line 312) | def get_sub_category(self):
class RiskModelEntity (line 316) | class RiskModelEntity(Entity):
class Identifier (line 317) | class Identifier(EntityIdentifier):
method __init__ (line 321) | def __init__(self, id_: str, entity: Optional[Dict] = None):
method data_dimension (line 325) | def data_dimension(self) -> str:
method entity_type (line 329) | def entity_type(cls) -> EntityType:
method get_by_identifier (line 333) | def get_by_identifier(cls, id_value: str, id_type: Identifier) -> Opti...
method get_name (line 336) | def get_name(self) -> Optional[str]:
method get_coverage (line 339) | def get_coverage(self) -> Optional[str]:
method get_term (line 342) | def get_term(self) -> Optional[str]:
method get_vendor (line 345) | def get_vendor(self) -> Optional[str]:
class PositionedEntity (line 349) | class PositionedEntity(metaclass=ABCMeta):
method __init__ (line 350) | def __init__(self, id_: str, entity_type: EntityType):
method id (line 355) | def id(self) -> str:
method positioned_entity_type (line 359) | def positioned_entity_type(self) -> EntityType:
method get_entitlements (line 362) | def get_entitlements(self) -> Entitlements:
method get_latest_position_set (line 371) | def get_latest_position_set(self, position_type: PositionType = Positi...
method get_position_set_for_date (line 380) | def get_position_set_for_date(self, date: dt.date, position_type: Posi...
method get_position_sets (line 394) | def get_position_sets(
method update_positions (line 411) | def update_positions(self, position_sets: List[PositionSet], net_posit...
method get_positions_data (line 429) | def get_positions_data(
method get_last_positions_data (line 445) | def get_last_positions_data(
method get_position_dates (line 457) | def get_position_dates(self) -> Tuple[dt.date, ...]:
method get_reports (line 464) | def get_reports(self, tags: Dict = None) -> List[Report]:
method get_status_of_reports (line 483) | def get_status_of_reports(self, tags: Dict = None) -> pd.DataFrame:
method get_factor_risk_reports (line 496) | def get_factor_risk_reports(self, fx_hedged: bool = None, tags: Dict =...
method get_factor_risk_report (line 514) | def get_factor_risk_report(
method get_thematic_report (line 536) | def get_thematic_report(self, tags: Dict = None) -> ThematicReport:
method poll_report (line 552) | def poll_report(self, report_id: str, timeout: int = 600, step: int = ...
method get_all_esg_data (line 588) | def get_all_esg_data(
method get_esg_summary (line 611) | def get_esg_summary(self, pricing_date: dt.date = None) -> pd.DataFrame:
method get_esg_quintiles (line 617) | def get_esg_quintiles(self, measure: ESGMeasure, pricing_date: dt.date...
method get_esg_by_sector (line 634) | def get_esg_by_sector(self, measure: ESGMeasure, pricing_date: dt.date...
method get_esg_by_region (line 643) | def get_esg_by_region(self, measure: ESGMeasure, pricing_date: dt.date...
method get_esg_top_ten (line 652) | def get_esg_top_ten(self, measure: ESGMeasure, pricing_date: dt.date =...
method get_esg_bottom_ten (line 661) | def get_esg_bottom_ten(self, measure: ESGMeasure, pricing_date: dt.dat...
method _get_esg_ranked_card (line 670) | def _get_esg_ranked_card(self, card: ESGCard, measure: ESGMeasure, pri...
method _get_esg_breakdown (line 678) | def _get_esg_breakdown(self, card: ESGCard, measure: ESGMeasure, prici...
method get_carbon_analytics (line 686) | def get_carbon_analytics(
method get_carbon_coverage (line 709) | def get_carbon_coverage(
method get_carbon_sbti_netzero_coverage (line 731) | def get_carbon_sbti_netzero_coverage(
method get_carbon_emissions (line 756) | def get_carbon_emissions(
method get_carbon_emissions_allocation (line 780) | def get_carbon_emissions_allocation(
method get_carbon_attribution_table (line 808) | def get_carbon_attribution_table(
method get_thematic_exposure (line 844) | def get_thematic_exposure(
method get_thematic_beta (line 876) | def get_thematic_beta(
method get_all_thematic_exposures (line 902) | def get_all_thematic_exposures(
method get_top_five_thematic_exposures (line 922) | def get_top_five_thematic_exposures(
method get_bottom_five_thematic_exposures (line 942) | def get_bottom_five_thematic_exposures(
method get_thematic_breakdown (line 959) | def get_thematic_breakdown(self, date: dt.date, basket_id: str) -> pd....
method get_factor_scenario_analytics (line 969) | def get_factor_scenario_analytics(
FILE: gs_quant/entities/entity_utils.py
function _explode_data (line 22) | def _explode_data(data: pd.Series, parent_label: str) -> Union[pd.DataFr...
FILE: gs_quant/entities/tree_entity.py
class AssetTreeNode (line 28) | class AssetTreeNode:
method __init__ (line 29) | def __init__(self, id, depth: Optional[int] = 0, date: Optional[dt.dat...
method __str__ (line 41) | def __str__(self):
method to_frame (line 45) | def to_frame(self) -> pd.DataFrame:
method populate_values (line 57) | def populate_values(self, dataset, value_column, underlier_column):
method build_tree (line 66) | def build_tree(self, dataset, underlier_column):
method __get_direct_underliers (line 83) | def __get_direct_underliers(self, asset_id, dataset) -> pd.DataFrame:
method __build_constituents_df (line 99) | def __build_constituents_df(self, constituents_df) -> pd.DataFrame:
class TreeHelper (line 121) | class TreeHelper:
method __init__ (line 122) | def __init__(
method populate_weights (line 138) | def populate_weights(self, dataset, weight_column: Optional[str] = 'we...
method populate_attribution (line 145) | def populate_attribution(self, dataset, attribution_column: Optional[s...
method to_frame (line 152) | def to_frame(self) -> pd.DataFrame:
method build_tree (line 173) | def build_tree(self):
method get_tree (line 179) | def get_tree(self) -> AssetTreeNode:
method get_visualisation (line 197) | def get_visualisation(self, visualise_by: str = 'name'):
FILE: gs_quant/errors.py
class MqError (line 20) | class MqError(Exception):
class MqValueError (line 26) | class MqValueError(MqError, ValueError):
class MqTypeError (line 30) | class MqTypeError(MqError):
class MqWrappedError (line 34) | class MqWrappedError(MqError):
class MqRequestError (line 38) | class MqRequestError(MqError):
method __init__ (line 39) | def __init__(self, status, message, context=None):
method __str__ (line 44) | def __str__(self):
class MqAuthenticationError (line 52) | class MqAuthenticationError(MqRequestError):
class MqAuthorizationError (line 56) | class MqAuthorizationError(MqRequestError):
class MqUninitialisedError (line 60) | class MqUninitialisedError(MqError):
class MqRateLimitedError (line 65) | class MqRateLimitedError(MqRequestError):
class MqTimeoutError (line 69) | class MqTimeoutError(MqRequestError):
class MqInternalServerError (line 73) | class MqInternalServerError(MqRequestError):
function error_builder (line 77) | def error_builder(status, message, context=None):
FILE: gs_quant/instrument/core.py
class Instrument (line 44) | class Instrument(PriceableImpl, InstrumentBase):
method __repr__ (line 48) | def __repr__(self):
method __asset_class_and_type_to_instrument (line 52) | def __asset_class_and_type_to_instrument(cls):
method provider (line 71) | def provider(self):
method resolve (line 74) | def resolve(self, in_place: bool = True) -> Optional[Union[PriceableIm...
method calc (line 116) | def calc(
method from_dict (line 217) | def from_dict(cls, values: dict):
method from_quick_entry (line 251) | def from_quick_entry(cls, text: str, asset_class: Optional[AssetClass]...
method from_asset_ids (line 273) | def from_asset_ids(cls, asset_ids: Tuple[str, ...]) -> Tuple[Instrumen...
method from_asset_id (line 291) | def from_asset_id(cls, asset_id: str) -> InstrumentBase:
method compose (line 295) | def compose(components: Iterable):
method flip (line 298) | def flip(self, in_place: bool = True):
method scale (line 301) | def scale(self, scaling: float, in_place: bool = True, check_resolved=...
class DummyInstrument (line 314) | class DummyInstrument(Instrument):
method __init__ (line 315) | def __init__(self, dummy_result: Union[str, float] = None):
method dummy_result (line 320) | def dummy_result(self) -> Union[str, float]:
method dummy_result (line 324) | def dummy_result(self, value: Union[str, float]):
method type (line 328) | def type(self) -> AssetType:
class Security (line 332) | class Security(XRef, Instrument):
method __init__ (line 335) | def __init__(
method from_dict (line 363) | def from_dict(cls, env):
function encode_instrument (line 367) | def encode_instrument(instrument: Optional[Instrument]) -> Optional[dict]:
function encode_instruments (line 372) | def encode_instruments(instruments: Optional[Iterable[Instrument]]) -> O...
FILE: gs_quant/interfaces/algebra.py
class AlgebraicType (line 20) | class AlgebraicType(abc.ABC):
method __add__ (line 22) | def __add__(self, other): ...
method __radd__ (line 24) | def __radd__(self, other):
method __sub__ (line 28) | def __sub__(self, other): ...
method __mul__ (line 31) | def __mul__(self, other): ...
method __rmul__ (line 33) | def __rmul__(self, other):
method __div__ (line 37) | def __div__(self, other): ...
FILE: gs_quant/json_convertors.py
function encode_date_or_str (line 37) | def encode_date_or_str(value: Optional[Union[str, dt.date]]) -> Optional...
function decode_optional_date (line 41) | def decode_optional_date(value: Optional[str]) -> Optional[dt.date]:
function decode_optional_time (line 54) | def decode_optional_time(value: Optional[str]) -> Optional[dt.time]:
function encode_optional_time (line 65) | def encode_optional_time(value: Optional[Union[str, dt.time]]) -> Option...
function decode_date_tuple (line 69) | def decode_date_tuple(blob: Tuple[str, ...]):
function encode_date_tuple (line 73) | def encode_date_tuple(values: Tuple[Optional[Union[str, dt.date]], ...]):
function decode_iso_date_or_datetime (line 81) | def decode_iso_date_or_datetime(value: Any) -> Union[Tuple[DateOrDateTim...
function optional_from_isodatetime (line 94) | def optional_from_isodatetime(datetime: Union[str, dt.datetime, None]) -...
function optional_to_isodatetime (line 100) | def optional_to_isodatetime(datetime: Optional[dt.datetime]):
function decode_dict_date_key (line 108) | def decode_dict_date_key(value):
function decode_dict_date_key_or_float (line 112) | def decode_dict_date_key_or_float(value):
function decode_dict_dict_date_key (line 118) | def decode_dict_dict_date_key(value):
function decode_dict_date_value (line 129) | def decode_dict_date_value(value):
function decode_datetime_tuple (line 133) | def decode_datetime_tuple(blob: Tuple[str, ...]):
function __try_decode_valid_date_formats (line 137) | def __try_decode_valid_date_formats(value: str) -> Optional[dt.date]:
function decode_date_or_str (line 146) | def decode_date_or_str(value: Union[dt.date, float, str]) -> Optional[Un...
function encode_datetime (line 164) | def encode_datetime(value: Optional[dt.datetime]) -> Optional[str]:
function decode_datetime (line 177) | def decode_datetime(value: Optional[Union[int, str]]) -> Optional[dt.dat...
function decode_float_or_str (line 194) | def decode_float_or_str(value: Optional[Union[float, int, str]]) -> Opti...
function decode_instrument (line 211) | def decode_instrument(value: Optional[Dict]):
function decode_named_instrument (line 217) | def decode_named_instrument(value: Optional[Union[Iterable[Dict], dict]]):
function decode_named_portfolio (line 227) | def decode_named_portfolio(value):
function encode_named_instrument (line 233) | def encode_named_instrument(obj):
function encode_named_portfolio (line 243) | def encode_named_portfolio(obj):
function encode_pandas_series (line 247) | def encode_pandas_series(obj):
function decode_pandas_series (line 254) | def decode_pandas_series(value: dict):
function decode_quote_report (line 259) | def decode_quote_report(value: Optional[dict]):
function decode_quote_reports (line 265) | def decode_quote_reports(value: Optional[Iterable[Dict]]):
function decode_custom_comment (line 271) | def decode_custom_comment(value: Optional[dict]):
function decode_custom_comments (line 277) | def decode_custom_comments(value: Optional[Iterable[Dict]]):
function decode_hedge_type (line 283) | def decode_hedge_type(value: Optional[dict]):
function decode_hedge_types (line 289) | def decode_hedge_types(value: Optional[Iterable[Dict]]):
function encode_dictable (line 295) | def encode_dictable(o):
function encode_named_dictable (line 299) | def encode_named_dictable(o):
function _get_dc_type (line 306) | def _get_dc_type(cls, name_field: str, allow_missing: bool):
function _value_decoder (line 318) | def _value_decoder(type_to_cls_map, explicit_cls=None, str_mapper=None):
function dc_decode (line 346) | def dc_decode(*classes, name_field='class_type', allow_missing=False):
FILE: gs_quant/json_convertors_common.py
function gsq_rm_for_name (line 29) | def gsq_rm_for_name(name: str) -> Optional[RiskMeasure]:
function encode_risk_measure (line 35) | def encode_risk_measure(rm: RiskMeasure) -> Dict:
function encode_risk_measure_tuple (line 42) | def encode_risk_measure_tuple(blob: Tuple[RiskMeasure, ...]) -> Tuple[Di...
function _decode_param (line 46) | def _decode_param(data: dict) -> Optional[RiskMeasureParameter]:
function _decode_gsq_risk_measure (line 56) | def _decode_gsq_risk_measure(data: dict) -> Optional[RiskMeasure]:
function decode_risk_measure (line 75) | def decode_risk_measure(data: Dict) -> RiskMeasure:
function decode_risk_measure_tuple (line 87) | def decode_risk_measure_tuple(blob: Tuple[Dict, ...]) -> Tuple[RiskMeasu...
FILE: gs_quant/json_encoder.py
function encode_default (line 26) | def encode_default(o):
class JSONEncoder (line 41) | class JSONEncoder(json.JSONEncoder):
method default (line 42) | def default(self, o):
FILE: gs_quant/markets/baskets.py
class ErrorMessage (line 79) | class ErrorMessage(Enum):
function _validate (line 89) | def _validate(*error_msgs):
class Basket (line 108) | class Basket(Asset, PositionedEntity):
method __init__ (line 113) | def __init__(self, gs_asset: GsAsset = None, **kwargs):
method get (line 139) | def get(cls, identifier: str, **kwargs):
method get_details (line 162) | def get_details(self) -> pd.DataFrame:
method create (line 190) | def create(self) -> dict:
method clone (line 224) | def clone(self):
method update (line 251) | def update(self) -> dict:
method upload_position_history (line 290) | def upload_position_history(self, position_sets: List[PositionSet]) ->...
method poll_status (line 330) | def poll_status(self, timeout: int = 600, step: int = 30) -> ReportSta...
method get_latest_rebalance_data (line 360) | def get_latest_rebalance_data(self) -> dict:
method get_latest_rebalance_date (line 384) | def get_latest_rebalance_date(self) -> dt.date:
method get_rebalance_approval_status (line 411) | def get_rebalance_approval_status(self) -> str:
method cancel_rebalance (line 438) | def cancel_rebalance(self) -> dict:
method get_corporate_actions (line 462) | def get_corporate_actions(
method get_fundamentals (line 500) | def get_fundamentals(
method get_live_date (line 542) | def get_live_date(self) -> Optional[dt.date]:
method get_type (line 559) | def get_type(self) -> Optional[SecAssetType]:
method get_latest_position_set (line 578) | def get_latest_position_set(
method get_position_set_for_date (line 587) | def get_position_set_for_date(
method get_position_sets (line 599) | def get_position_sets(
method get_url (line 615) | def get_url(self) -> str:
method add_factor_risk_report (line 635) | def add_factor_risk_report(self, risk_model_id: str, fx_hedged: bool):
method delete_factor_risk_report (line 661) | def delete_factor_risk_report(self, risk_model_id: str):
method allow_ca_restricted_assets (line 686) | def allow_ca_restricted_assets(self) -> Optional[bool]:
method allow_ca_restricted_assets (line 692) | def allow_ca_restricted_assets(self, value: bool):
method allow_limited_access_assets (line 696) | def allow_limited_access_assets(self) -> Optional[bool]:
method allow_limited_access_assets (line 702) | def allow_limited_access_assets(self, value: bool):
method asset_class (line 706) | def asset_class(self) -> Optional[AssetClass]:
method asset_class (line 712) | def asset_class(self, value: AssetClass):
method benchmark (line 716) | def benchmark(self) -> Optional[str]:
method benchmark (line 722) | def benchmark(self, value: str):
method backtest_parameters (line 726) | def backtest_parameters(self) -> Optional[EqBasketBacktestParameters]:
method backtest_parameters (line 732) | def backtest_parameters(self, value: EqBasketBacktestParameters):
method bloomberg_publish_parameters (line 738) | def bloomberg_publish_parameters(self) -> Optional[BloombergPublishPar...
method bloomberg_publish_parameters (line 744) | def bloomberg_publish_parameters(self, value: BloombergPublishParamete...
method cash_reinvestment_treatment (line 748) | def cash_reinvestment_treatment(self) -> Optional[CashReinvestmentTrea...
method cash_reinvestment_treatment (line 754) | def cash_reinvestment_treatment(self, value: Union[CashReinvestmentTre...
method clone_parent_id (line 763) | def clone_parent_id(self) -> Optional[str]:
method currency (line 768) | def currency(self) -> Optional[IndicesCurrency]:
method currency (line 774) | def currency(self, value: IndicesCurrency):
method default_backcast (line 778) | def default_backcast(self) -> Optional[bool]:
method default_backcast (line 784) | def default_backcast(self, value: bool):
method description (line 790) | def description(self) -> Optional[str]:
method description (line 796) | def description(self, value: str):
method divisor (line 801) | def divisor(self) -> Optional[float]:
method divisor (line 807) | def divisor(self, value: float):
method entitlements (line 813) | def entitlements(self) -> Optional[BasketEntitlements]:
method entitlements (line 819) | def entitlements(self, value: BasketEntitlements):
method flagship (line 823) | def flagship(self) -> Optional[bool]:
method flagship (line 829) | def flagship(self, value: bool):
method hedge_id (line 833) | def hedge_id(self) -> Optional[str]:
method historical_methodology (line 838) | def historical_methodology(self) -> Optional[EqBasketHistoryMethodology]:
method historical_methodology (line 844) | def historical_methodology(self, value: EqBasketHistoryMethodology):
method include_price_history (line 849) | def include_price_history(self) -> Optional[bool]:
method include_price_history (line 855) | def include_price_history(self, value: bool):
method initial_price (line 860) | def initial_price(self) -> Optional[float]:
method initial_price (line 866) | def initial_price(self, value: float):
method name (line 871) | def name(self) -> Optional[str]:
method name (line 877) | def name(self, value: str):
method parent_basket (line 883) | def parent_basket(self) -> Optional[str]:
method parent_basket (line 891) | def parent_basket(self, value: str):
method position_set (line 897) | def position_set(self) -> Optional[PositionSet]:
method position_set (line 903) | def position_set(self, value: PositionSet):
method preferred_risk_model (line 908) | def preferred_risk_model(self) -> Optional[str]:
method preferred_risk_model (line 914) | def preferred_risk_model(self, value: str):
method publish_to_bloomberg (line 919) | def publish_to_bloomberg(self) -> Optional[bool]:
method publish_to_bloomberg (line 925) | def publish_to_bloomberg(self, value: bool):
method publish_to_factset (line 930) | def publish_to_factset(self) -> Optional[bool]:
method publish_to_factset (line 936) | def publish_to_factset(self, value: bool):
method publish_to_reuters (line 940) | def publish_to_reuters(self) -> Optional[bool]:
method publish_to_reuters (line 946) | def publish_to_reuters(self, value: bool):
method rebalance_calendar (line 950) | def rebalance_calendar(self) -> Optional[EqBasketRebalanceCalendar]:
method rebalance_calendar (line 956) | def rebalance_calendar(self, value: EqBasketRebalanceCalendar):
method return_type (line 960) | def return_type(self) -> Optional[ReturnType]:
method return_type (line 966) | def return_type(self, value: ReturnType):
method reweight (line 970) | def reweight(self) -> Optional[bool]:
method reweight (line 976) | def reweight(self, value: bool):
method target_notional (line 980) | def target_notional(self) -> Optional[float]:
method target_notional (line 986) | def target_notional(self, value: float):
method ticker (line 990) | def ticker(self) -> Optional[str]:
method ticker (line 996) | def ticker(self, value: str):
method weighting_strategy (line 1001) | def weighting_strategy(self) -> Optional[WeightingStrategy]:
method weighting_strategy (line 1007) | def weighting_strategy(self, value: WeightingStrategy):
method pricing_date (line 1011) | def pricing_date(self) -> Optional[dt.date]:
method pricing_date (line 1017) | def pricing_date(self, value: dt.date):
method action_date (line 1021) | def action_date(self) -> Optional[dt.date]:
method action_date (line 1027) | def action_date(self, value: dt.date):
method allow_system_approval (line 1031) | def allow_system_approval(self) -> Optional[bool]:
method allow_system_approval (line 1038) | def allow_system_approval(self, value: bool):
method __edit_and_rebalance (line 1041) | def __edit_and_rebalance(
method __finish_initialization (line 1062) | def __finish_initialization(self):
method __get_gs_asset (line 1094) | def __get_gs_asset(identifier: str) -> GsAsset:
method __get_latest_create_report (line 1101) | def __get_latest_create_report(self) -> Report:
method __get_updates (line 1108) | def __get_updates(self) -> Tuple[Optional[CustomBasketsEditInputs], Op...
method __populate_current_attributes_for_existing_basket (line 1159) | def __populate_current_attributes_for_existing_basket(self, gs_asset: ...
method __populate_default_attributes_for_new_basket (line 1185) | def __populate_default_attributes_for_new_basket(self, **kwargs):
method __set_error_messages (line 1223) | def __set_error_messages(self):
method __validate_position_set (line 1243) | def __validate_position_set(position_set: PositionSet):
method __validate_ticker (line 1258) | def __validate_ticker(ticker: str):
FILE: gs_quant/markets/core.py
class PricingCache (line 54) | class PricingCache(metaclass=ABCMeta):
method clear (line 62) | def clear(cls):
method get (line 66) | def get(cls, risk_key: RiskKey, instrument: InstrumentBase) -> Optiona...
method put (line 70) | def put(cls, risk_key: RiskKey, instrument: InstrumentBase, result: Ca...
method drop (line 75) | def drop(cls, instrument: InstrumentBase):
class PricingContext (line 80) | class PricingContext(ContextBaseWithDefault):
method __init__ (line 85) | def __init__(
method __save_attrs_to (line 220) | def __save_attrs_to(self, attr_dict):
method _inherited_val (line 240) | def _inherited_val(self, parameter, default=None, from_active=False):
method _on_enter (line 264) | def _on_enter(self):
method __reset_atts (line 286) | def __reset_atts(self):
method _on_exit (line 307) | def _on_exit(self, exc_type, exc_val, exc_tb):
method __calc (line 316) | def __calc(self):
method __risk_key (line 451) | def __risk_key(self, risk_measure: RiskMeasure, provider: type) -> Ris...
method _parameters (line 455) | def _parameters(self) -> RiskRequestParameters:
method _scenario (line 464) | def _scenario(self) -> Optional[MarketDataScenario]:
method active_context (line 474) | def active_context(self):
method is_current (line 480) | def is_current(self) -> bool:
method _max_concurrent (line 484) | def _max_concurrent(self) -> int:
method _max_concurrent (line 488) | def _max_concurrent(self, value):
method _max_per_batch (line 492) | def _max_per_batch(self) -> int:
method _max_per_batch (line 496) | def _max_per_batch(self, value):
method _dates_per_batch (line 500) | def _dates_per_batch(self) -> int:
method _dates_per_batch (line 504) | def _dates_per_batch(self, value):
method is_async (line 508) | def is_async(self) -> bool:
method is_batch (line 514) | def is_batch(self) -> bool:
method market (line 518) | def market(self) -> Market:
method market_data_location (line 529) | def market_data_location(self) -> PricingLocation:
method csa_term (line 537) | def csa_term(self) -> str:
method show_progress (line 541) | def show_progress(self) -> bool:
method timeout (line 545) | def timeout(self) -> int:
method request_priority (line 549) | def request_priority(self) -> int:
method use_server_cache (line 553) | def use_server_cache(self) -> bool:
method provider (line 561) | def provider(self) -> Type[GenericRiskApi]:
method market_behaviour (line 565) | def market_behaviour(self) -> str:
method pricing_date (line 573) | def pricing_date(self) -> dt.date:
method use_cache (line 581) | def use_cache(self) -> bool:
method visible_to_gs (line 586) | def visible_to_gs(self) -> Optional[bool]:
method set_parameters_only (line 591) | def set_parameters_only(self) -> bool:
method use_historical_diddles_only (line 595) | def use_historical_diddles_only(self) -> bool:
method clone (line 600) | def clone(self, **kwargs):
method _calc (line 605) | def _calc(self, instrument: InstrumentBase, risk_key: RiskKey) -> Pric...
method calc (line 626) | def calc(self, instrument: InstrumentBase, risk_measure: RiskMeasure) ...
class PositionContext (line 646) | class PositionContext(ContextBaseWithDefault):
method __init__ (line 651) | def __init__(self, position_date: Optional[dt.date] = None):
method position_date (line 695) | def position_date(self):
method default_value (line 699) | def default_value(cls) -> object:
method clone (line 702) | def clone(self, **kwargs):
FILE: gs_quant/markets/factor.py
class ReturnFormat (line 42) | class ReturnFormat(Enum):
class Factor (line 49) | class Factor:
method __init__ (line 50) | def __init__(
method id (line 71) | def id(self):
method name (line 75) | def name(self):
method type (line 79) | def type(self) -> str:
method category (line 83) | def category(self) -> str:
method tooltip (line 87) | def tooltip(self):
method description (line 91) | def description(self):
method glossary_description (line 95) | def glossary_description(self):
method risk_model_id (line 99) | def risk_model_id(self):
method covariance (line 102) | def covariance(
method variance (line 133) | def variance(
method volatility (line 149) | def volatility(
method correlation (line 175) | def correlation(
method returns (line 211) | def returns(
method intraday_returns (line 241) | def intraday_returns(
method mimicking_portfolio (line 275) | def mimicking_portfolio(
FILE: gs_quant/markets/factor_analytics.py
class FactorAnalytics (line 29) | class FactorAnalytics:
method __init__ (line 35) | def __init__(self, risk_model_id: str, currency: str = 'USD', particip...
method get_factor_analysis (line 47) | def get_factor_analysis(self, position_set: PositionSet) -> Dict:
method convert_hedge_factor_exposures (line 132) | def convert_hedge_factor_exposures(self, style_factors: List) -> Dict:
method create_exposure_bar_chart (line 155) | def create_exposure_bar_chart(self, exposures: Dict[str, float], title...
method create_style_factor_chart (line 212) | def create_style_factor_chart(
method create_exposure_summary_table (line 264) | def create_exposure_summary_table(self, factor_analysis: Dict) -> pd.D...
method create_performance_chart (line 290) | def create_performance_chart(
method create_dynamic_performance_chart (line 326) | def create_dynamic_performance_chart(
method create_factor_heatmap_comparison (line 443) | def create_factor_heatmap_comparison(
FILE: gs_quant/markets/hedge.py
class FactorExposureCategory (line 37) | class FactorExposureCategory(Enum):
class ConstraintType (line 44) | class ConstraintType(Enum):
class HedgeExclusions (line 53) | class HedgeExclusions:
method __init__ (line 58) | def __init__(
method assets (line 73) | def assets(self) -> List[str]:
method assets (line 77) | def assets(self, value: List[str]):
method countries (line 81) | def countries(self) -> List[str]:
method countries (line 85) | def countries(self, value: List[str]):
method regions (line 89) | def regions(self) -> List[str]:
method regions (line 93) | def regions(self, value: List[str]):
method sectors (line 97) | def sectors(self) -> List[str]:
method sectors (line 101) | def sectors(self, value: List[str]):
method industries (line 105) | def industries(self) -> List[str]:
method industries (line 109) | def industries(self, value: List[str]):
method to_dict (line 112) | def to_dict(self):
method _get_exclusions (line 130) | def _get_exclusions(exclusions_list: List, constraint_type: Constraint...
class Constraint (line 137) | class Constraint:
method __init__ (line 138) | def __init__(
method constraint_name (line 151) | def constraint_name(self) -> str:
method constraint_name (line 155) | def constraint_name(self, value: str):
method minimum (line 159) | def minimum(self) -> float:
method minimum (line 163) | def minimum(self, value: float):
method maximum (line 167) | def maximum(self) -> float:
method maximum (line 171) | def maximum(self, value: float):
method constraint_type (line 175) | def constraint_type(self) -> Optional[ConstraintType]:
method constraint_type (line 179) | def constraint_type(self, value: ConstraintType):
method from_dict (line 183) | def from_dict(cls, as_dict: Dict):
method to_dict (line 197) | def to_dict(self):
class HedgeConstraints (line 208) | class HedgeConstraints:
method __init__ (line 213) | def __init__(
method assets (line 242) | def assets(self) -> List[Constraint]:
method assets (line 246) | def assets(self, value: List[Constraint]):
method countries (line 250) | def countries(self) -> List[Constraint]:
method countries (line 254) | def countries(self, value: List[Constraint]):
method regions (line 258) | def regions(self) -> List[Constraint]:
method regions (line 262) | def regions(self, value: List[Constraint]):
method sectors (line 266) | def sectors(self) -> List[Constraint]:
method sectors (line 270) | def sectors(self, value: List[Constraint]):
method industries (line 274) | def industries(self) -> List[Constraint]:
method industries (line 278) | def industries(self, value: List[Constraint]):
method esg (line 282) | def esg(self) -> List[Constraint]:
method esg (line 286) | def esg(self, value: List[Constraint]):
method to_dict (line 289) | def to_dict(self):
class PerformanceHedgeParameters (line 310) | class PerformanceHedgeParameters:
method __init__ (line 313) | def __init__(
method initial_portfolio (line 362) | def initial_portfolio(self) -> PositionSet:
method initial_portfolio (line 367) | def initial_portfolio(self, value: PositionSet):
method universe (line 371) | def universe(self) -> List[str]:
method universe (line 377) | def universe(self, value: List[str]):
method observation_start_date (line 381) | def observation_start_date(self) -> dt.date:
method observation_start_date (line 386) | def observation_start_date(self, value: dt.date):
method exclusions (line 390) | def exclusions(self) -> Optional[HedgeExclusions]:
method exclusions (line 395) | def exclusions(self, value: HedgeExclusions):
method constraints (line 399) | def constraints(self) -> Optional[HedgeConstraints]:
method constraints (line 404) | def constraints(self, value: HedgeConstraints):
method sampling_period (line 408) | def sampling_period(self) -> str:
method sampling_period (line 413) | def sampling_period(self, value: str):
method max_leverage (line 417) | def max_leverage(self) -> float:
method max_leverage (line 422) | def max_leverage(self, value: float):
method percentage_in_cash (line 426) | def percentage_in_cash(self) -> Optional[float]:
method percentage_in_cash (line 431) | def percentage_in_cash(self, value: float):
method explode_universe (line 435) | def explode_universe(self) -> bool:
method explode_universe (line 441) | def explode_universe(self, value: bool):
method exclude_target_assets (line 445) | def exclude_target_assets(self) -> bool:
method exclude_target_assets (line 450) | def exclude_target_assets(self, value: bool):
method exclude_corporate_actions_types (line 454) | def exclude_corporate_actions_types(self) -> Optional[List[Union[Corpo...
method exclude_corporate_actions_types (line 459) | def exclude_corporate_actions_types(self, value: List[Union[CorporateA...
method exclude_hard_to_borrow_assets (line 463) | def exclude_hard_to_borrow_assets(self) -> bool:
method exclude_hard_to_borrow_assets (line 469) | def exclude_hard_to_borrow_assets(self, value: bool):
method exclude_restricted_assets (line 473) | def exclude_restricted_assets(self) -> bool:
method exclude_restricted_assets (line 478) | def exclude_restricted_assets(self, value: bool):
method max_adv_percentage (line 482) | def max_adv_percentage(self) -> float:
method max_adv_percentage (line 488) | def max_adv_percentage(self, value: float):
method max_return_deviation (line 492) | def max_return_deviation(self) -> float:
method max_return_deviation (line 498) | def max_return_deviation(self, value: float):
method max_weight (line 502) | def max_weight(self) -> float:
method max_weight (line 507) | def max_weight(self, value: float):
method min_market_cap (line 511) | def min_market_cap(self) -> Optional[float]:
method min_market_cap (line 516) | def min_market_cap(self, value: float):
method max_market_cap (line 520) | def max_market_cap(self) -> Optional[float]:
method max_market_cap (line 525) | def max_market_cap(self, value: float):
method market_participation_rate (line 529) | def market_participation_rate(self) -> float:
method market_participation_rate (line 535) | def market_participation_rate(self, value: float):
method benchmarks (line 539) | def benchmarks(self) -> List[str]:
method benchmarks (line 544) | def benchmarks(self, value: List[str]):
method lasso_weight (line 548) | def lasso_weight(self) -> float:
method lasso_weight (line 553) | def lasso_weight(self, value: float):
method ridge_weight (line 557) | def ridge_weight(self) -> float:
method ridge_weight (line 562) | def ridge_weight(self, value: float):
method to_dict (line 565) | def to_dict(self, resolved_identifiers):
method resolve_identifiers_in_payload (line 669) | def resolve_identifiers_in_payload(self, hedge_date) -> tuple:
class Hedge (line 686) | class Hedge:
method __init__ (line 691) | def __init__(self, parameters, objective: HedgeObjective):
method parameters (line 697) | def parameters(self):
method parameters (line 701) | def parameters(self, value):
method objective (line 705) | def objective(self):
method result (line 709) | def result(self) -> Dict:
method calculate (line 712) | def calculate(self) -> Dict:
method get_constituents (line 733) | def get_constituents(self) -> pd.DataFrame:
method get_statistics (line 749) | def get_statistics(self) -> pd.DataFrame:
method get_backtest_performance (line 761) | def get_backtest_performance(self) -> pd.DataFrame:
method get_backtest_correlation (line 768) | def get_backtest_correlation(self) -> pd.DataFrame:
method _get_timeseries (line 775) | def _get_timeseries(self, timeseries_name: str) -> pd.DataFrame:
method _format_hedge_calculate_results (line 789) | def _format_hedge_calculate_results(calculation_results):
method _enhance_result_with_benchmark_curves (line 803) | def _enhance_result_with_benchmark_curves(formatted_results, benchmark...
method format_dictionary_key_to_readable_format (line 818) | def format_dictionary_key_to_readable_format(renamed_results):
method find_optimal_hedge (line 827) | def find_optimal_hedge(hedge_query: dict, hyperparams: dict, metric: s...
method create_optimization_mappings (line 861) | def create_optimization_mappings() -> dict:
method construct_portfolio_weights_and_asset_numbers (line 880) | def construct_portfolio_weights_and_asset_numbers(results: dict) -> Un...
method asset_id_diffs (line 895) | def asset_id_diffs(portfolio_asset_ids, thomson_reuters_asset_ids):
method create_transaction_cost_data_structures (line 911) | def create_transaction_cost_data_structures(
method t_cost (line 974) | def t_cost(basis_points, notional_traded):
method compute_notional_traded (line 988) | def compute_notional_traded(notional_on_the_day, prev_weight, curr_wei...
method compute_tcosts (line 1002) | def compute_tcosts(basis_points, asset_weights, asset_notionals, backt...
class PerformanceHedge (line 1039) | class PerformanceHedge(Hedge):
method __init__ (line 1040) | def __init__(self, parameters: PerformanceHedgeParameters = None, **kw...
FILE: gs_quant/markets/historical.py
class HistoricalPricingContext (line 30) | class HistoricalPricingContext(PricingContext):
method __init__ (line 35) | def __init__(
method _market (line 109) | def _market(self, date: dt.date, location: str) -> CloseMarket:
method calc (line 112) | def calc(self, instrument: InstrumentBase, risk_measure: RiskMeasure) ...
method date_range (line 127) | def date_range(self):
class BackToTheFuturePricingContext (line 131) | class BackToTheFuturePricingContext(HistoricalPricingContext):
method __init__ (line 136) | def __init__(
method calc (line 211) | def calc(self, instrument: InstrumentBase, risk_measure: RiskMeasure) ...
FILE: gs_quant/markets/index.py
class Index (line 38) | class Index(Asset, PositionedEntity):
method __init__ (line 44) | def __init__(
method __str__ (line 65) | def __str__(self):
method get_type (line 68) | def get_type(self) -> AssetType:
method get_currency (line 71) | def get_currency(self) -> Optional[Currency]:
method get_return_type (line 74) | def get_return_type(self) -> ReturnType:
method get (line 81) | def get(cls, identifier: str) -> Optional['Index']:
method get_fundamentals (line 114) | def get_fundamentals(
method get_latest_close_price (line 158) | def get_latest_close_price(self, price_type: List[PriceType] = None) -...
method get_close_price_for_date (line 199) | def get_close_price_for_date(
method get_close_prices (line 242) | def get_close_prices(
method get_underlier_tree (line 294) | def get_underlier_tree(self, refresh_tree: Optional[bool] = False) -> ...
method get_underlier_weights (line 324) | def get_underlier_weights(self) -> pd.DataFrame:
method get_underlier_attribution (line 348) | def get_underlier_attribution(self) -> pd.DataFrame:
method visualise_tree (line 371) | def visualise_tree(self, visualise_by: Optional[str] = 'asset_name'):
method get_latest_constituents (line 393) | def get_latest_constituents(self) -> pd.DataFrame:
method get_constituents_for_date (line 415) | def get_constituents_for_date(self, date: dt.date = dt.date.today()) -...
method get_constituents (line 438) | def get_constituents(
method get_latest_constituent_instruments (line 463) | def get_latest_constituent_instruments(self) -> Tuple[Instrument, ...]:
method get_constituent_instruments_for_date (line 485) | def get_constituent_instruments_for_date(self, date: dt.date = dt.date...
method get_constituent_instruments (line 508) | def get_constituent_instruments(
method __is_sts_index (line 536) | def __is_sts_index(self) -> bool:
method __query_indicative_levels_dataset (line 543) | def __query_indicative_levels_dataset(self, start=None, end=None) -> p...
method __get_gs_asset (line 560) | def __get_gs_asset(identifier: str) -> GsAsset:
FILE: gs_quant/markets/indices_utils.py
class BasketType (line 40) | class BasketType(EnumBase, Enum):
method __repr__ (line 46) | def __repr__(self):
method to_list (line 50) | def to_list(cls):
class CorporateActionType (line 54) | class CorporateActionType(EnumBase, Enum):
method __repr__ (line 67) | def __repr__(self):
method to_list (line 71) | def to_list(cls):
class CustomBasketStyles (line 75) | class CustomBasketStyles(EnumBase, Enum):
method __repr__ (line 104) | def __repr__(self):
class IndicesDatasets (line 108) | class IndicesDatasets(EnumBase, Enum):
method __repr__ (line 123) | def __repr__(self):
class PriceType (line 127) | class PriceType(EnumBase, Enum):
method __repr__ (line 133) | def __repr__(self):
method to_list (line 137) | def to_list(cls):
class Region (line 141) | class Region(EnumBase, Enum):
method __repr__ (line 150) | def __repr__(self):
class ResearchBasketStyles (line 154) | class ResearchBasketStyles(EnumBase, Enum):
method __repr__ (line 184) | def __repr__(self):
class ReturnType (line 188) | class ReturnType(EnumBase, Enum):
method __repr__ (line 195) | def __repr__(self):
class STSIndexType (line 199) | class STSIndexType(EnumBase, Enum):
method __repr__ (line 207) | def __repr__(self):
method to_list (line 211) | def to_list(cls):
class WeightingStrategy
Copy disabled (too large)
Download .json
Condensed preview — 1679 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (27,077K chars).
[
{
"path": ".gitattributes",
"chars": 53,
"preview": "*.sh eol=lf\ngs_quant/_version.py export-subst\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 592,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: \"[BUG]\"\nlabels: ''\nassignees: andyphillipsgs\n\n---\n"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 550,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe th"
},
{
"path": ".github/workflows/python-publish.yml",
"chars": 837,
"preview": "# This workflows will upload a Python Package using Twine when a release is created\n# For more information see: https://"
},
{
"path": ".gitignore",
"chars": 22,
"preview": "*.pyc\ngs_quant/.idea/\n"
},
{
"path": ".gitlab-ci.yml",
"chars": 1327,
"preview": "include:\n - project: 'fp/open-source/os-ci'\n file:\n - '.gitlab-ci.yml'\n\nvariables:\n CURL: /sw/gs/git-prod/dist"
},
{
"path": ".gs-project.yml",
"chars": 129,
"preview": "productGuid: \"product::820010\"\n\n\n#etch section\netch:\n testResultPaths:\n - type: \"JUNIT\"\n paths:\n - \"pyte"
},
{
"path": ".pre-commit-config.yaml",
"chars": 387,
"preview": "# run pip install .[develop] to install dependencies\nrepos:\n - repo: local\n hooks:\n - id: ruff-lint\n nam"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3226,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "CONTRIBUTING.md",
"chars": 5045,
"preview": "# Contributing to gs-quant\n\nThis file contains information about reporting issues as well as contributing code. Make sur"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": "\n Apache License\n Version 2.0, January 2004\n "
},
{
"path": "MANIFEST.in",
"chars": 363,
"preview": "include gs_quant/config.ini\ninclude gs_quant/resources/asset-service.json\ninclude gs_quant/resources/data-service.json\ni"
},
{
"path": "NOTICE",
"chars": 38,
"preview": "gs-quant\nCopyright 2018 Goldman Sachs\n"
},
{
"path": "NOTICE.txt",
"chars": 131,
"preview": "gs-quant\nCopyright 2018-2019 Goldman Sachs\nThis product contains code copyright Scott Weinstein, licensed under Apache 2"
},
{
"path": "README.md",
"chars": 1325,
"preview": "# GS Quant\n\n**GS Quant** is a Python toolkit for quantitative finance, created on top of one of the world’s most powerfu"
},
{
"path": "SKILL.md",
"chars": 19071,
"preview": "---\nname: gs-quant\ndescription: This document covers the core workflows for using the `gs_quant` library: establishing a"
},
{
"path": "conftest.py",
"chars": 219,
"preview": "# This import is needed to register the magic pylint hooks to make it skip the integration tests\n# flake8: noqa\n# pylint"
},
{
"path": "dco/Bryan Galindo.dco",
"chars": 518,
"preview": "1) I, Bryan Galindo, certify that all work committed with the commit message\n\"covered by: Bryan Galindo.dco\" is my origi"
},
{
"path": "dco/Grant McGovern.dco",
"chars": 520,
"preview": "1) I, Grant McGovern, certify that all work committed with the commit message\n\"covered by: Grant McGovern.dco\" is my ori"
},
{
"path": "dco/Maverick Lin.dco",
"chars": 517,
"preview": "1) I, Maverick Lin, certify that all work committed with the commit message\n\"covered by: Maverick Lin.dco\" is my origina"
},
{
"path": "dco/Scott Weinstein.dco",
"chars": 522,
"preview": "1) I, Scott Weinstein, certify that all work committed with the commit message\n\"covered by: Scott Weinstein.dco\" is my o"
},
{
"path": "docs/Makefile",
"chars": 580,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHI"
},
{
"path": "docs/README.md",
"chars": 473,
"preview": "# Overview\n\nSphinx-generated documentation for gs-quant codebase\n\nIf you're looking for tutorials and other developer do"
},
{
"path": "docs/_build/html/.buildinfo",
"chars": 230,
"preview": "# Sphinx build info version 1\n# This file hashes the configuration used when building these files. When it is not found,"
},
{
"path": "docs/_build/html/_modules/aenum.html",
"chars": 525990,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/base.html",
"chars": 97055,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/data/core.html",
"chars": 19353,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/data/dataset.html",
"chars": 34299,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/data/fields.html",
"chars": 11037,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/datetime/date.html",
"chars": 39075,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/datetime/point.html",
"chars": 65189,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/instrument/core.html",
"chars": 49059,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/markets/core.html",
"chars": 56940,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/markets/historical.html",
"chars": 32623,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/markets/portfolio.html",
"chars": 95285,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/markets/securities.html",
"chars": 128255,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/models/epidemiology.html",
"chars": 110908,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/risk/core.html",
"chars": 63119,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/risk/measures.html",
"chars": 44572,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/target/common.html",
"chars": 4203924,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/target/instrument.html",
"chars": 1361839,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/algebra.html",
"chars": 81693,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/analysis.html",
"chars": 24308,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/backtesting.html",
"chars": 24369,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/datetime.html",
"chars": 61124,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/econometrics.html",
"chars": 113071,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/helper.html",
"chars": 31864,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/statistics.html",
"chars": 195414,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/gs_quant/timeseries/technicals.html",
"chars": 36511,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_modules/index.html",
"chars": 5623,
"preview": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\""
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.base.Priceable.rst.txt",
"chars": 570,
"preview": "gs\\_quant.base.Priceable\n========================\n\n.. currentmodule:: gs_quant.base\n\n.. autoclass:: Priceable\n\n \n ."
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.data.DataContext.rst.txt",
"chars": 485,
"preview": "gs\\_quant.data.DataContext\n==========================\n\n.. currentmodule:: gs_quant.data\n\n.. autoclass:: DataContext\n\n "
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.data.Dataset.rst.txt",
"chars": 464,
"preview": "gs\\_quant.data.Dataset\n======================\n\n.. currentmodule:: gs_quant.data\n\n.. autoclass:: Dataset\n\n \n .. auto"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.data.Fields.rst.txt",
"chars": 906,
"preview": "gs\\_quant.data.Fields\n=====================\n\n.. currentmodule:: gs_quant.data\n\n.. autoclass:: Fields\n\n \n .. automet"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.CommodOTCSwap.rst.txt",
"chars": 753,
"preview": "CommodOTCSwap\n=============\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.CommodSwap.rst.txt",
"chars": 536,
"preview": "CommodSwap\n==========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instru"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.EqCliquet.rst.txt",
"chars": 1003,
"preview": "EqCliquet\n=========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrum"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.EqForward.rst.txt",
"chars": 601,
"preview": "EqForward\n=========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrum"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.EqOption.rst.txt",
"chars": 1169,
"preview": "EqOption\n========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrumen"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.EqSynthetic.rst.txt",
"chars": 718,
"preview": "EqSynthetic\n===========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.ins"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.EqVarianceSwap.rst.txt",
"chars": 695,
"preview": "EqVarianceSwap\n==============\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_qua"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.FXBinary.rst.txt",
"chars": 947,
"preview": "FXBinary\n========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrumen"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.FXForward.rst.txt",
"chars": 549,
"preview": "FXForward\n=========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrum"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.FXMultiCrossBinary.rst.txt",
"chars": 848,
"preview": "FXMultiCrossBinary\n==================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.FXMultiCrossBinaryLeg.rst.txt",
"chars": 579,
"preview": "FXMultiCrossBinaryLeg\n=====================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentm"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.FXOption.rst.txt",
"chars": 1118,
"preview": "FXOption\n========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrumen"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.FXVolatilitySwap.rst.txt",
"chars": 944,
"preview": "FXVolatilitySwap\n================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.Forward.rst.txt",
"chars": 504,
"preview": "Forward\n=======\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrument\n"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRBasisSwap.rst.txt",
"chars": 1423,
"preview": "IRBasisSwap\n===========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.ins"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRCMSOption.rst.txt",
"chars": 977,
"preview": "IRCMSOption\n===========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.ins"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRCMSOptionStrip.rst.txt",
"chars": 1219,
"preview": "IRCMSOptionStrip\n================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRCMSSpreadOption.rst.txt",
"chars": 1004,
"preview": "IRCMSSpreadOption\n=================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: "
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRCMSSpreadOptionStrip.rst.txt",
"chars": 1234,
"preview": "IRCMSSpreadOptionStrip\n======================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. curren"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRCap.rst.txt",
"chars": 1105,
"preview": "IRCap\n=====\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrument\n\n.. "
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRFloor.rst.txt",
"chars": 1113,
"preview": "IRFloor\n=======\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrument\n"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRSwap.rst.txt",
"chars": 1797,
"preview": "IRSwap\n======\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrument\n\n."
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRSwaption.rst.txt",
"chars": 1561,
"preview": "IRSwaption\n==========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instr"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRXccySwap.rst.txt",
"chars": 1801,
"preview": "IRXccySwap\n==========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instr"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRXccySwapFixFix.rst.txt",
"chars": 1275,
"preview": "IRXccySwapFixFix\n================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.IRXccySwapFixFlt.rst.txt",
"chars": 1791,
"preview": "IRXccySwapFixFlt\n================\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.InflationSwap.rst.txt",
"chars": 950,
"preview": "InflationSwap\n=============\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.instrument.Security.rst.txt",
"chars": 1905,
"preview": "Security\n========\n\nFor methods of this class, see :doc:`gs_quant.base.Priceable`\n\n.. currentmodule:: gs_quant.instrumen"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.HistoricalPricingContext.rst.txt",
"chars": 1015,
"preview": "gs\\_quant.markets.HistoricalPricingContext\n==========================================\n\n.. currentmodule:: gs_quant.mark"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.PricingContext.rst.txt",
"chars": 825,
"preview": "gs\\_quant.markets.PricingContext\n================================\n\n.. currentmodule:: gs_quant.markets\n\n.. autoclass:: "
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.portfolio.Portfolio.rst.txt",
"chars": 1373,
"preview": "gs\\_quant.markets.portfolio.Portfolio\n=====================================\n\n.. currentmodule:: gs_quant.markets.portfo"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.Asset.rst.txt",
"chars": 652,
"preview": "gs\\_quant.markets.securities.Asset\n==================================\n\n.. currentmodule:: gs_quant.markets.securities\n\n"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.AssetClass.rst.txt",
"chars": 592,
"preview": "gs\\_quant.markets.securities.AssetClass\n=======================================\n\n.. currentmodule:: gs_quant.markets.se"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.AssetIdentifier.rst.txt",
"chars": 546,
"preview": "gs\\_quant.markets.securities.AssetIdentifier\n============================================\n\n.. currentmodule:: gs_quant."
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.AssetType.rst.txt",
"chars": 913,
"preview": "gs\\_quant.markets.securities.AssetType\n======================================\n\n.. currentmodule:: gs_quant.markets.secu"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.Index.rst.txt",
"chars": 737,
"preview": "gs\\_quant.markets.securities.Index\n==================================\n\n.. currentmodule:: gs_quant.markets.securities\n\n"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.SecurityMaster.rst.txt",
"chars": 337,
"preview": "gs\\_quant.markets.securities.SecurityMaster\n===========================================\n\n.. currentmodule:: gs_quant.ma"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.markets.securities.Stock.rst.txt",
"chars": 678,
"preview": "gs\\_quant.markets.securities.Stock\n==================================\n\n.. currentmodule:: gs_quant.markets.securities\n\n"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.models.epidemiology.EpidemicModel.rst.txt",
"chars": 386,
"preview": "gs\\_quant.models.epidemiology.EpidemicModel\n===========================================\n\n.. currentmodule:: gs_quant.mo"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.models.epidemiology.SEIR.rst.txt",
"chars": 317,
"preview": "gs\\_quant.models.epidemiology.SEIR\n==================================\n\n.. currentmodule:: gs_quant.models.epidemiology\n"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.models.epidemiology.SIR.rst.txt",
"chars": 311,
"preview": "gs\\_quant.models.epidemiology.SIR\n=================================\n\n.. currentmodule:: gs_quant.models.epidemiology\n\n."
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.timeseries.datetime.Window.rst.txt",
"chars": 260,
"preview": "gs\\_quant.timeseries.datetime.Window\n====================================\n\n.. currentmodule:: gs_quant.timeseries.datet"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.timeseries.statistics.LinearRegression.rst.txt",
"chars": 455,
"preview": "gs\\_quant.timeseries.statistics.LinearRegression\n================================================\n\n.. currentmodule:: g"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.timeseries.statistics.RollingLinearRegression.rst.txt",
"chars": 468,
"preview": "gs\\_quant.timeseries.statistics.RollingLinearRegression\n=======================================================\n\n.. cur"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.timeseries.statistics.SEIRModel.rst.txt",
"chars": 521,
"preview": "gs\\_quant.timeseries.statistics.SEIRModel\n=========================================\n\n.. currentmodule:: gs_quant.timese"
},
{
"path": "docs/_build/html/_sources/classes/gs_quant.timeseries.statistics.SIRModel.rst.txt",
"chars": 428,
"preview": "gs\\_quant.timeseries.statistics.SIRModel\n========================================\n\n.. currentmodule:: gs_quant.timeseri"
},
{
"path": "docs/_build/html/_sources/data.rst.txt",
"chars": 135,
"preview": "Data Package\n============\n\n.. currentmodule:: gs_quant.data\n\n.. autosummary::\n :toctree: classes\n\n DataContext\n Da"
},
{
"path": "docs/_build/html/_sources/datetime.rst.txt",
"chars": 346,
"preview": "Datetime Package\n================\n\nDate\n----\n.. currentmodule:: gs_quant.datetime.date\n\n.. autosummary::\n :toctree: fu"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.datetime.date.business_day_count.rst.txt",
"chars": 171,
"preview": "gs\\_quant.datetime.date.business\\_day\\_count\n============================================\n\n.. currentmodule:: gs_quant."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.datetime.date.business_day_offset.rst.txt",
"chars": 174,
"preview": "gs\\_quant.datetime.date.business\\_day\\_offset\n=============================================\n\n.. currentmodule:: gs_quan"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.datetime.date.date_range.rst.txt",
"chars": 145,
"preview": "gs\\_quant.datetime.date.date\\_range\n===================================\n\n.. currentmodule:: gs_quant.datetime.date\n\n.. "
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.datetime.date.is_business_day.rst.txt",
"chars": 162,
"preview": "gs\\_quant.datetime.date.is\\_business\\_day\n=========================================\n\n.. currentmodule:: gs_quant.dateti"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.datetime.date.prev_business_date.rst.txt",
"chars": 171,
"preview": "gs\\_quant.datetime.date.prev\\_business\\_date\n============================================\n\n.. currentmodule:: gs_quant."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.datetime.point.point_sort_order.rst.txt",
"chars": 168,
"preview": "gs\\_quant.datetime.point.point\\_sort\\_order\n===========================================\n\n.. currentmodule:: gs_quant.da"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.abs_.rst.txt",
"chars": 142,
"preview": "gs\\_quant.timeseries.algebra.abs\\_\n==================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.add.rst.txt",
"chars": 137,
"preview": "gs\\_quant.timeseries.algebra.add\n================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.. a"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.and_.rst.txt",
"chars": 142,
"preview": "gs\\_quant.timeseries.algebra.and\\_\n==================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.ceil.rst.txt",
"chars": 140,
"preview": "gs\\_quant.timeseries.algebra.ceil\n=================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.divide.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.algebra.divide\n===================================\n\n.. currentmodule:: gs_quant.timeseries.algebra"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.exp.rst.txt",
"chars": 137,
"preview": "gs\\_quant.timeseries.algebra.exp\n================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.. a"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.filter_.rst.txt",
"chars": 151,
"preview": "gs\\_quant.timeseries.algebra.filter\\_\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.alg"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.floor.rst.txt",
"chars": 143,
"preview": "gs\\_quant.timeseries.algebra.floor\n==================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.floordiv.rst.txt",
"chars": 152,
"preview": "gs\\_quant.timeseries.algebra.floordiv\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.alg"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.if_.rst.txt",
"chars": 139,
"preview": "gs\\_quant.timeseries.algebra.if\\_\n=================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.log.rst.txt",
"chars": 137,
"preview": "gs\\_quant.timeseries.algebra.log\n================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.. a"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.multiply.rst.txt",
"chars": 152,
"preview": "gs\\_quant.timeseries.algebra.multiply\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.alg"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.not_.rst.txt",
"chars": 142,
"preview": "gs\\_quant.timeseries.algebra.not\\_\n==================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.or_.rst.txt",
"chars": 139,
"preview": "gs\\_quant.timeseries.algebra.or\\_\n=================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.power.rst.txt",
"chars": 143,
"preview": "gs\\_quant.timeseries.algebra.power\n==================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.repeat.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.algebra.repeat\n===================================\n\n.. currentmodule:: gs_quant.timeseries.algebra"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.smooth_spikes.rst.txt",
"chars": 169,
"preview": "gs\\_quant.timeseries.algebra.smooth\\_spikes\n===========================================\n\n.. currentmodule:: gs_quant.ti"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.sqrt.rst.txt",
"chars": 140,
"preview": "gs\\_quant.timeseries.algebra.sqrt\n=================================\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.subtract.rst.txt",
"chars": 152,
"preview": "gs\\_quant.timeseries.algebra.subtract\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.alg"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.algebra.weighted_sum.rst.txt",
"chars": 166,
"preview": "gs\\_quant.timeseries.algebra.weighted\\_sum\n==========================================\n\n.. currentmodule:: gs_quant.time"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.count.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.analysis.count\n===================================\n\n.. currentmodule:: gs_quant.timeseries.analysi"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.diff.rst.txt",
"chars": 143,
"preview": "gs\\_quant.timeseries.analysis.diff\n==================================\n\n.. currentmodule:: gs_quant.timeseries.analysis\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.first.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.analysis.first\n===================================\n\n.. currentmodule:: gs_quant.timeseries.analysi"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.lag.rst.txt",
"chars": 140,
"preview": "gs\\_quant.timeseries.analysis.lag\n=================================\n\n.. currentmodule:: gs_quant.timeseries.analysis\n\n."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.last.rst.txt",
"chars": 143,
"preview": "gs\\_quant.timeseries.analysis.last\n==================================\n\n.. currentmodule:: gs_quant.timeseries.analysis\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.last_value.rst.txt",
"chars": 163,
"preview": "gs\\_quant.timeseries.analysis.last\\_value\n=========================================\n\n.. currentmodule:: gs_quant.timese"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.analysis.weighted_sum.rst.txt",
"chars": 128,
"preview": "weighted_sum\n==================================\n\n.. currentmodule:: gs_quant.timeseries.analysis\n\n.. autofunction:: weig"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.backtesting.basket.rst.txt",
"chars": 158,
"preview": "gs\\_quant.timeseries.backtesting.basket\n=======================================\n\n.. currentmodule:: gs_quant.timeseries"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.align.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.datetime.align\n===================================\n\n.. currentmodule:: gs_quant.timeseries.datetim"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.date_range.rst.txt",
"chars": 163,
"preview": "gs\\_quant.timeseries.datetime.date\\_range\n=========================================\n\n.. currentmodule:: gs_quant.timese"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.day.rst.txt",
"chars": 140,
"preview": "gs\\_quant.timeseries.datetime.day\n=================================\n\n.. currentmodule:: gs_quant.timeseries.datetime\n\n."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.interpolate.rst.txt",
"chars": 164,
"preview": "gs\\_quant.timeseries.datetime.interpolate\n=========================================\n\n.. currentmodule:: gs_quant.timese"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.month.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.datetime.month\n===================================\n\n.. currentmodule:: gs_quant.timeseries.datetim"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.prepend.rst.txt",
"chars": 152,
"preview": "gs\\_quant.timeseries.datetime.prepend\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.dat"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.quarter.rst.txt",
"chars": 152,
"preview": "gs\\_quant.timeseries.datetime.quarter\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.dat"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.union.rst.txt",
"chars": 145,
"preview": "gs\\_quant.timeseries.datetime.union\n===================================\n\n.. currentmodule:: gs_quant.timeseries.datetime"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.value.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.datetime.value\n===================================\n\n.. currentmodule:: gs_quant.timeseries.datetim"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.weekday.rst.txt",
"chars": 152,
"preview": "gs\\_quant.timeseries.datetime.weekday\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.dat"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.datetime.year.rst.txt",
"chars": 143,
"preview": "gs\\_quant.timeseries.datetime.year\n==================================\n\n.. currentmodule:: gs_quant.timeseries.datetime\n"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.annualize.rst.txt",
"chars": 170,
"preview": "gs\\_quant.timeseries.econometrics.annualize\n===========================================\n\n.. currentmodule:: gs_quant.ti"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.beta.rst.txt",
"chars": 155,
"preview": "gs\\_quant.timeseries.econometrics.beta\n======================================\n\n.. currentmodule:: gs_quant.timeseries.e"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.change.rst.txt",
"chars": 161,
"preview": "gs\\_quant.timeseries.econometrics.change\n========================================\n\n.. currentmodule:: gs_quant.timeseri"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.correlation.rst.txt",
"chars": 176,
"preview": "gs\\_quant.timeseries.econometrics.correlation\n=============================================\n\n.. currentmodule:: gs_quan"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.excess_returns_.rst.txt",
"chars": 192,
"preview": "gs\\_quant.timeseries.econometrics.excess\\_returns\\_\n===================================================\n\n.. currentmodu"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.index.rst.txt",
"chars": 158,
"preview": "gs\\_quant.timeseries.econometrics.index\n=======================================\n\n.. currentmodule:: gs_quant.timeseries"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.max_drawdown.rst.txt",
"chars": 181,
"preview": "gs\\_quant.timeseries.econometrics.max\\_drawdown\n===============================================\n\n.. currentmodule:: gs_"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.prices.rst.txt",
"chars": 161,
"preview": "gs\\_quant.timeseries.econometrics.prices\n========================================\n\n.. currentmodule:: gs_quant.timeseri"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.returns.rst.txt",
"chars": 164,
"preview": "gs\\_quant.timeseries.econometrics.returns\n=========================================\n\n.. currentmodule:: gs_quant.timese"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.sharpe_ratio.rst.txt",
"chars": 181,
"preview": "gs\\_quant.timeseries.econometrics.sharpe\\_ratio\n===============================================\n\n.. currentmodule:: gs_"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.econometrics.volatility.rst.txt",
"chars": 173,
"preview": "gs\\_quant.timeseries.econometrics.volatility\n============================================\n\n.. currentmodule:: gs_quant."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.cov.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.statistics.cov\n===================================\n\n.. currentmodule:: gs_quant.timeseries.statist"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.exponential_std.rst.txt",
"chars": 184,
"preview": "gs\\_quant.timeseries.statistics.exponential\\_std\n================================================\n\n.. currentmodule:: g"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.generate_series.rst.txt",
"chars": 184,
"preview": "gs\\_quant.timeseries.statistics.generate\\_series\n================================================\n\n.. currentmodule:: g"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.max_.rst.txt",
"chars": 151,
"preview": "gs\\_quant.timeseries.statistics.max\\_\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.sta"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.mean.rst.txt",
"chars": 149,
"preview": "gs\\_quant.timeseries.statistics.mean\n====================================\n\n.. currentmodule:: gs_quant.timeseries.stati"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.median.rst.txt",
"chars": 155,
"preview": "gs\\_quant.timeseries.statistics.median\n======================================\n\n.. currentmodule:: gs_quant.timeseries.s"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.min_.rst.txt",
"chars": 151,
"preview": "gs\\_quant.timeseries.statistics.min\\_\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.sta"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.mode.rst.txt",
"chars": 149,
"preview": "gs\\_quant.timeseries.statistics.mode\n====================================\n\n.. currentmodule:: gs_quant.timeseries.stati"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.percentile.rst.txt",
"chars": 167,
"preview": "gs\\_quant.timeseries.statistics.percentile\n==========================================\n\n.. currentmodule:: gs_quant.time"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.percentiles.rst.txt",
"chars": 170,
"preview": "gs\\_quant.timeseries.statistics.percentiles\n===========================================\n\n.. currentmodule:: gs_quant.ti"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.product.rst.txt",
"chars": 158,
"preview": "gs\\_quant.timeseries.statistics.product\n=======================================\n\n.. currentmodule:: gs_quant.timeseries"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.range_.rst.txt",
"chars": 157,
"preview": "gs\\_quant.timeseries.statistics.range\\_\n=======================================\n\n.. currentmodule:: gs_quant.timeseries"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.std.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.statistics.std\n===================================\n\n.. currentmodule:: gs_quant.timeseries.statist"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.sum_.rst.txt",
"chars": 151,
"preview": "gs\\_quant.timeseries.statistics.sum\\_\n=====================================\n\n.. currentmodule:: gs_quant.timeseries.sta"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.var.rst.txt",
"chars": 146,
"preview": "gs\\_quant.timeseries.statistics.var\n===================================\n\n.. currentmodule:: gs_quant.timeseries.statist"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.winsorize.rst.txt",
"chars": 164,
"preview": "gs\\_quant.timeseries.statistics.winsorize\n=========================================\n\n.. currentmodule:: gs_quant.timese"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.statistics.zscores.rst.txt",
"chars": 158,
"preview": "gs\\_quant.timeseries.statistics.zscores\n=======================================\n\n.. currentmodule:: gs_quant.timeseries"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.bollinger_bands.rst.txt",
"chars": 184,
"preview": "gs\\_quant.timeseries.technicals.bollinger\\_bands\n================================================\n\n.. currentmodule:: g"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.exponential_moving_average.rst.txt",
"chars": 219,
"preview": "gs\\_quant.timeseries.technicals.exponential\\_moving\\_average\n=========================================================="
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.exponential_spread_volatility.rst.txt",
"chars": 228,
"preview": "gs\\_quant.timeseries.technicals.exponential\\_spread\\_volatility\n======================================================="
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.exponential_volatility.rst.txt",
"chars": 205,
"preview": "gs\\_quant.timeseries.technicals.exponential\\_volatility\n=======================================================\n\n.. cur"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.moving_average.rst.txt",
"chars": 181,
"preview": "gs\\_quant.timeseries.technicals.moving\\_average\n===============================================\n\n.. currentmodule:: gs_"
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.relative_strength_index.rst.txt",
"chars": 210,
"preview": "gs\\_quant.timeseries.technicals.relative\\_strength\\_index\n=========================================================\n\n.."
},
{
"path": "docs/_build/html/_sources/functions/gs_quant.timeseries.technicals.smoothed_moving_average.rst.txt",
"chars": 210,
"preview": "gs\\_quant.timeseries.technicals.smoothed\\_moving\\_average\n=========================================================\n\n.."
},
{
"path": "docs/_build/html/_sources/index.rst.txt",
"chars": 394,
"preview": ".. gs_quant documentation master file, created by\n sphinx-quickstart on Sat Jan 5 20:53:00 2019.\n You can adapt thi"
},
{
"path": "docs/_build/html/_sources/instrument.rst.txt",
"chars": 689,
"preview": "\nInstrument Package\n==================\n\n.. currentmodule:: gs_quant.base\n\n.. autosummary::\n :toctree: classes\n\n Pric"
},
{
"path": "docs/_build/html/_sources/market.rst.txt",
"chars": 361,
"preview": "\nMarket Package\n==============\n\n.. currentmodule:: gs_quant.markets\n\n.. autosummary::\n :toctree: classes\n\n PricingCo"
},
{
"path": "docs/_build/html/_sources/markets.rst.txt",
"chars": 485,
"preview": "\nMarkets Package\n===============\n\n.. currentmodule:: gs_quant.markets\n\n.. autosummary::\n :toctree: classes\n\n Pricing"
},
{
"path": "docs/_build/html/_sources/models.rst.txt",
"chars": 183,
"preview": "\nModels Package\n==============\n\nEpidemiology\n------------\n\n.. currentmodule:: gs_quant.models.epidemiology\n\n.. autosumma"
},
{
"path": "docs/_build/html/_sources/risk.rst.txt",
"chars": 1341,
"preview": "\nRisk Package\n============\n\nFunctions\n---------\n.. currentmodule:: gs_quant.risk\n\n.. autofunction:: aggregate_risk\n.. au"
},
{
"path": "docs/_build/html/_sources/timeseries.rst.txt",
"chars": 1985,
"preview": "\nTimeseries Package\n==================\n\nAlgebra\n-------\n\n.. currentmodule:: gs_quant.timeseries.algebra\n\n.. autosummary:"
},
{
"path": "docs/_build/html/_static/basic.css",
"chars": 13642,
"preview": "/*\n * basic.css\n * ~~~~~~~~~\n *\n * Sphinx stylesheet -- basic theme.\n *\n * :copyright: Copyright 2007-2020 by the Sphinx"
},
{
"path": "docs/_build/html/_static/css/theme.css",
"chars": 101637,
"preview": "/* sphinx_rtd_theme version 0.4.3 | MIT license */\n/* Built 20190212 16:02 */\n* {\n -webkit-box-sizing: border-box;\n -m"
},
{
"path": "docs/_build/html/_static/doctools.js",
"chars": 9416,
"preview": "/*\n * doctools.js\n * ~~~~~~~~~~~\n *\n * Sphinx JavaScript utilities for all documentation.\n *\n * :copyright: Copyright 20"
},
{
"path": "docs/_build/html/_static/documentation_options.js",
"chars": 353,
"preview": "var DOCUMENTATION_OPTIONS = {\n URL_ROOT: document.getElementById(\"documentation_options\").getAttribute('data-url_root"
},
{
"path": "docs/_build/html/_static/jquery-3.5.1.js",
"chars": 287630,
"preview": "/*!\n * jQuery JavaScript Library v3.5.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * C"
},
{
"path": "docs/_build/html/_static/jquery.js",
"chars": 89476,
"preview": "/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */\n!function(e,t){\"use strict\";\"object"
},
{
"path": "docs/_build/html/_static/js/theme.js",
"chars": 309,
"preview": "document.addEventListener(\"DOMContentLoaded\", () => {\n var trigger = document.getElementById(\"gs-nav-action\");\n var na"
},
{
"path": "docs/_build/html/_static/language_data.js",
"chars": 10847,
"preview": "/*\n * language_data.js\n * ~~~~~~~~~~~~~~~~\n *\n * This script contains the language-specific data used by searchtools.js,"
},
{
"path": "docs/_build/html/_static/pygments.css",
"chars": 4753,
"preview": "pre { line-height: 125%; margin: 0; }\ntd.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; "
},
{
"path": "docs/_build/html/_static/searchtools.js",
"chars": 16323,
"preview": "/*\n * searchtools.js\n * ~~~~~~~~~~~~~~~~\n *\n * Sphinx JavaScript utilities for the full-text search.\n *\n * :copyright: C"
},
{
"path": "docs/_build/html/_static/underscore-1.3.1.js",
"chars": 35168,
"preview": "// Underscore.js 1.3.1\n// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.\n// Underscore is freely distribu"
}
]
// ... and 1479 more files (download for full content)
About this extraction
This page contains the full source code of the goldmansachs/gs-quant GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1679 files (24.4 MB), approximately 6.5M tokens, and a symbol index with 6620 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.