fds.sdk.OptimizationEngineAPIMultiperiod


Namefds.sdk.OptimizationEngineAPIMultiperiod JSON
Version 0.21.13 PyPI version JSON
download
home_pagehttps://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1
SummaryOptimization Engine API (Multi-period) client library for Python
upload_time2024-11-01 10:13:16
maintainerNone
docs_urlNone
authorFactSet Research Systems
requires_python>=3.7
licenseApache License, Version 2.0
keywords factset api sdk
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![FactSet](https://raw.githubusercontent.com/factset/enterprise-sdk/main/docs/images/factset-logo.svg)](https://www.factset.com)

# Optimization Engine API (Multi-period) client library for Python

[![API Version](https://img.shields.io/badge/api-v1-blue)]()
[![PyPi](https://img.shields.io/pypi/v/fds.sdk.OptimizationEngineAPIMultiperiod)](https://pypi.org/project/fds.sdk.OptimizationEngineAPIMultiperiod/)
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1
- SDK version: 0.21.13
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements

* Python >= 3.7

## Installation

### Poetry

```shell
poetry add fds.sdk.utils fds.sdk.OptimizationEngineAPIMultiperiod==0.21.13
```

### pip

```shell
pip install fds.sdk.utils fds.sdk.OptimizationEngineAPIMultiperiod==0.21.13
```

## Usage

1. [Generate authentication credentials](../../../../README.md#authentication).
2. Setup Python environment.
   1. Install and activate python 3.7+. If you're using [pyenv](https://github.com/pyenv/pyenv):

      ```sh
      pyenv install 3.9.7
      pyenv shell 3.9.7
      ```

   2. (optional) [Install poetry](https://python-poetry.org/docs/#installation).
3. [Install dependencies](#installation).
4. Run the following:

> [!IMPORTANT]
> The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.

### Example Code

```python
from fds.sdk.utils.authentication import ConfidentialClient

import fds.sdk.OptimizationEngineAPIMultiperiod
from fds.sdk.OptimizationEngineAPIMultiperiod.api import default_api
from fds.sdk.OptimizationEngineAPIMultiperiod.models import *
from dateutil.parser import parse as dateutil_parser
from pprint import pprint

# See configuration.py for a list of all supported configuration parameters.

# Examples for each supported authentication method are below,
# choose one that satisfies your use case.

# (Preferred) OAuth 2.0: FactSetOAuth2
# See https://github.com/FactSet/enterprise-sdk#oauth-20
# for information on how to create the app-config.json file
#
# The confidential client instance should be reused in production environments.
# See https://github.com/FactSet/enterprise-sdk-utils-python#authentication
# for more information on using the ConfidentialClient class
configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(
    fds_oauth_client=ConfidentialClient('/path/to/app-config.json')
)

# Basic authentication: FactSetApiKey
# See https://github.com/FactSet/enterprise-sdk#api-key
# for information how to create an API key
# configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(
#     username='USERNAME-SERIAL',
#     password='API-KEY'
# )

# Enter a context with an instance of the API client
with fds.sdk.OptimizationEngineAPIMultiperiod.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    multi_period_input = OptimizerInputsMultiPeriodInput(
        strategy=OptimizerInputsMultiPeriodStrategy(
            objective=OptimizerInputsMultiPeriodObjective(
                factor_exposure=[
                    OptimizerInputsMPFactorExposureTerm(
                        term=OptimizerInputsFactorExposureTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            factors=[
                                "factors_example",
                            ],
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                volatility=[
                    OptimizerInputsMPVolatilityTerm(
                        term=OptimizerInputsVolatilityTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            risk_type=OptimizerInputsEObjectiveRiskTypeEnum(0),
                            factors=[
                                "factors_example",
                            ],
                            active_risk=True,
                            benchmark_index=1,
                        ),
                        term_on=OptimizerInputsBoundSourceEnum(0),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                general_linear=[
                    OptimizerInputsMPGeneralLinearTerm(
                        term=OptimizerInputsGeneralLinearTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            attribute=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            method=OptimizerInputsEAggregationMethodEnum(0),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                expected_return=[
                    OptimizerInputsMPExpectedReturnTerm(
                        term=OptimizerInputsExpectedReturnTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            return_values=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            use_alpha=True,
                            rel_to_benchmark=True,
                            benchmark_index=1,
                        ),
                        term_on=OptimizerInputsBoundSourceEnum(0),
                        annualization_factor=3.14,
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                sensitivity=[
                    OptimizerInputsMPSensitivityTerm(
                        term=OptimizerInputsSensitivityTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            sensitivity_attribute=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                objective_ratio=OptimizerInputsMPObjectiveRatioTerm(
                    sharpe_ratio=OptimizerInputsSharpeRatioTerm(
                        name="name_example",
                        multiplier=OptimizerInputsValue(
                            value_type=OptimizerInputsEValueTypeEnum(0),
                            raw_value=3.14,
                            ref_index=1,
                        ),
                        risk_free_rate=OptimizerInputsValue(
                            value_type=OptimizerInputsEValueTypeEnum(0),
                            raw_value=3.14,
                            ref_index=1,
                        ),
                        direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                        active_risk=True,
                        benchmark_index=1,
                    ),
                    starr=OptimizerInputsSTARRTerm(
                        name="name_example",
                        multiplier=OptimizerInputsValue(
                            value_type=OptimizerInputsEValueTypeEnum(0),
                            raw_value=3.14,
                            ref_index=1,
                        ),
                        risk_free_rate=OptimizerInputsValue(
                            value_type=OptimizerInputsEValueTypeEnum(0),
                            raw_value=3.14,
                            ref_index=1,
                        ),
                        direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                        confidence_level=3.14,
                        use_centered_etl=True,
                        active_risk=True,
                        benchmark_index=1,
                    ),
                    diversification_ratio=OptimizerInputsDiversificationRatioTerm(
                        name="name_example",
                        multiplier=OptimizerInputsValue(
                            value_type=OptimizerInputsEValueTypeEnum(0),
                            raw_value=3.14,
                            ref_index=1,
                        ),
                        direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                    ),
                    on_periods=OptimizerInputsOnPeriods(
                        periods=[
                            1,
                        ],
                    ),
                    across_periods=OptimizerInputsAcrossPeriods(
                        start_period=1,
                        end_period=1,
                        rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                            frequency=1,
                            method=OptimizerInputsRollingMethodEnum(0),
                        ),
                    ),
                ),
                tail_risk=[
                    OptimizerInputsMPTailRiskTerm(
                        term=OptimizerInputsTailRiskTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            risk_measure=OptimizerInputsTailRiskMeasureEnum(0),
                            confidence_level=3.14,
                            use_centered_etl=True,
                            active_risk=True,
                            benchmark_index=1,
                        ),
                        term_on=OptimizerInputsBoundSourceEnum(0),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                target_probability=[
                    OptimizerInputsMPTargetProbabilityTerm(
                        term=OptimizerInputsTargetProbabilityTerm(
                            name="name_example",
                            multiplier=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),
                            threshold_min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            threshold_max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                        ),
                        constrain_on=OptimizerInputsBoundSourceEnum(0),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
            ),
            constraints=OptimizerInputsMultiPeriodConstraints(
                expected_returns=[
                    OptimizerInputsMPExpectedReturnConstraint(
                        constraint=OptimizerInputsExpectedReturnConstraint(
                            name="name_example",
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            return_value=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            use_strategy_return_value=True,
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            return_type=OptimizerInputsEConstraintReturnTypeEnum(0),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                            hierarchy=1,
                        ),
                        constraint_on=OptimizerInputsBoundSourceEnum(0),
                        annualization_factor=3.14,
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                diversification=[
                    OptimizerInputsMPDiversificationConstraint(
                        constraint=OptimizerInputsDiversificationConstraint(
                            name="name_example",
                            asset_value=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max_percent=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                factor_exposures=[
                    OptimizerInputsMPFactorExposureConstraint(
                        constraint=OptimizerInputsFactorExposureConstraint(
                            name="name_example",
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                            factors=OptimizerInputsFactorExposureAttributes(
                                min=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            hierarchy=1,
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                general_linear=[
                    OptimizerInputsMPGeneralLinearConstraint(
                        constraint=OptimizerInputsGeneralLinearConstraint(
                            name="name_example",
                            security_attribute=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            weighting_method=OptimizerInputsEWeightingMethodTypeEnum(0),
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            hierarchy=1,
                            rel_to_benchmark=True,
                            benchmark_index=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                holding_threshold=[
                    OptimizerInputsMPHoldingsThresholdConstraint(
                        constraint=OptimizerInputsHoldingsThresholdConstraint(
                            name="name_example",
                            custom_asset=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                leverage=[
                    OptimizerInputsMPLeverageConstraint(
                        constraint=OptimizerInputsLeverageConstraint(
                            name="name_example",
                            value=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            value_type=OptimizerInputsELeverageValueTypeEnum(0),
                            hierarchy=1,
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                num_of_assets=[
                    OptimizerInputsMPNumberofAssetsConstraint(
                        constraint=OptimizerInputsNumberofAssetsConstraint(
                            name="name_example",
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                sensitivity=[
                    OptimizerInputsMPSensitivityConstraint(
                        constraint=OptimizerInputsSensitivityConstraint(
                            name="name_example",
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            sensitivity_attribute=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                            hierarchy=1,
                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                weight_constraint=[
                    OptimizerInputsMPHoldingsWeightConstraint(
                        constraint=OptimizerInputsHoldingsWeightConstraint(
                            name="name_example",
                            custom_asset=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),
                            weight_type=OptimizerInputsEFPOConstraintWeightTypeEnum(0),
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),
                            rel_to_benchmark=True,
                            benchmark_index=1,
                            hierarchy=1,
                            apply_only_to_direct=True,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                number_of_buys=[
                    OptimizerInputsMPNumberOfBuysConstraint(
                        constraint=OptimizerInputsNumberOfBuysConstraint(
                            name="name_example",
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                number_of_sells=[
                    OptimizerInputsMPNumberOfSellsConstraint(
                        constraint=OptimizerInputsNumberOfSellsConstraint(
                            name="name_example",
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                round_lots=[
                    OptimizerInputsMPRoundlotsConstraint(
                        constraint=OptimizerInputsRoundlotsConstraint(
                            name="name_example",
                            asset_level=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            custom_asset=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),
                            general_value=3.14,
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                trade_threshold=[
                    OptimizerInputsMPTradeThresholdConstraint(
                        constraint=OptimizerInputsTradeThresholdConstraint(
                            name="name_example",
                            min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            custom_asset=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),
                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                trading_turnover=[
                    OptimizerInputsMPTurnoverConstraint(
                        constraint=OptimizerInputsTurnoverConstraint(
                            name="name_example",
                            max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            custom_asset=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            value_type=OptimizerInputsEConstraintValueTypeEnum(0),
                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),
                            turnover_type=OptimizerInputsEConstraintTurnoverTypeEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                risk_contribution=[
                    OptimizerInputsMPRiskContributionConstraint(
                        constraint=OptimizerInputsRiskContributionConstraint(
                            name="name_example",
                            max_percent=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            custom_asset=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),
                            risk_type=OptimizerInputsEConstraintRiskTypeEnum(0),
                            hierarchy=1,
                        ),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                    ),
                ],
                risk_volatility=[
                    OptimizerInputsMPRiskVolatilityConstraint(
                        constraint=OptimizerInputsRiskVolatilityConstraint(
                            name="name_example",
                            max_value_of_risk=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            level=OptimizerInputsEConstraintLevelEnum(0),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            groups=[
                                OptimizerInputsConstraintGroup(
                                    min=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    max=OptimizerInputsValue(
                                        value_type=OptimizerInputsEValueTypeEnum(0),
                                        raw_value=3.14,
                                        ref_index=1,
                                    ),
                                    id="id_example",
                                    nested_groups=[],
                                    group_lookup_index=1,
                                ),
                            ],
                            risk_type=OptimizerInputsEConstraintRiskTypeEnum(0),
                            active_risk=True,
                            benchmark_index=1,
                            hierarchy=1,
                        ),
                        constraint_on=OptimizerInputsBoundSourceEnum(0),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                tail_risk=[
                    OptimizerInputsMPLimitTailRiskConstraint(
                        constraint=OptimizerInputsLimitTailRiskConstraint(
                            name="name_example",
                            risk_measure=OptimizerInputsTailRiskMeasureEnum(0),
                            max_risk=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            confidence_level=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            penalty=OptimizerInputsPenalty(
                                enabled=True,
                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),
                                penalty_value=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                                max_violation=OptimizerInputsValue(
                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                    raw_value=3.14,
                                    ref_index=1,
                                ),
                            ),
                            active_risk=True,
                            benchmark_index=1,
                            hierarchy=1,
                        ),
                        constraint_on=OptimizerInputsBoundSourceEnum(0),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
                target_probability=[
                    OptimizerInputsMPTargetProbabilityConstraint(
                        constraint=OptimizerInputsTargetProbabilityConstraint(
                            name="name_example",
                            threshold_min=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            threshold_max=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            min_probability=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            max_probability=OptimizerInputsValue(
                                value_type=OptimizerInputsEValueTypeEnum(0),
                                raw_value=3.14,
                                ref_index=1,
                            ),
                            hierarchy=1,
                        ),
                        constraint_on=OptimizerInputsBoundSourceEnum(0),
                        on_periods=OptimizerInputsOnPeriods(
                            periods=[
                                1,
                            ],
                        ),
                        across_periods=OptimizerInputsAcrossPeriods(
                            start_period=1,
                            end_period=1,
                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(
                                frequency=1,
                                method=OptimizerInputsRollingMethodEnum(0),
                            ),
                        ),
                    ),
                ],
            ),
            transaction_cost=OptimizerInputsTransactionCost(
                unit_type=OptimizerInputsETransactionCostUnitTypeEnum(0),
                buy_cost=OptimizerInputsValue(
                    value_type=OptimizerInputsEValueTypeEnum(0),
                    raw_value=3.14,
                    ref_index=1,
                ),
                sell_cost=OptimizerInputsValue(
                    value_type=OptimizerInputsEValueTypeEnum(0),
                    raw_value=3.14,
                    ref_index=1,
                ),
            ),
            options=OptimizerInputsMultiPeriodOptions(
                options=OptimizerInputsOptions(
                    max_run_time=1,
                    convergence_tolerance=3.14,
                    cash_flow_formula=OptimizerInputsValue(
                        value_type=OptimizerInputsEValueTypeEnum(0),
                        raw_value=3.14,
                        ref_index=1,
                    ),
                    convert_weights_to_cash_for_ip=True,
                    convert_weights_to_cash_for_bmk=True,
                    composite_asset_lookthrough_level=1,
                ),
                weight_rebalance_periods=[
                    1,
                ],
                total_periods_count=1,
                initial_point_randomization_count=1,
            ),
            expected_return=OptimizerInputsExpectedReturn(
                alpha=OptimizerInputsValue(
                    value_type=OptimizerInputsEValueTypeEnum(0),
                    raw_value=3.14,
                    ref_index=1,
                ),
                alpha_unit=OptimizerInputsEAlphaUnitTypeEnum(0),
            ),
        ),
        universe=OptimizerInputsTotalUniverse(
            assets=[
                OptimizerInputsAsset(
                    symbol="symbol_example",
                    price=3.14,
                ),
            ],
            composite_assets=OptimizerInputsCompositeAsset(
                constituents=[
                    OptimizerInputsCompositeConstituent(
                        univ_index=1,
                        weight=3.14,
                        price=OptimizerInputsAssetPrice(
                            source=OptimizerInputsAssetPriceEPriceSource(0),
                            price_override=3.14,
                        ),
                    ),
                ],
            ),
            derivatives=OptimizerInputsDerivative(
                offset_index=1,
                future=OptimizerInputsDerivativeFuture(
                    contract_size=3.14,
                    method=OptimizerInputsDerivativeFutureEComputationMethodEnum(0),
                    using_pa_multiply=True,
                ),
                forward=True,
            ),
        ),
        portfolios=OptimizerInputsPortfolios(
            initial=OptimizerInputsPortfolio(
                holdings=[
                    OptimizerInputsPortfolioItem(
                        univ_index=1,
                        price=OptimizerInputsAssetPrice(
                            source=OptimizerInputsAssetPriceEPriceSource(0),
                            price_override=3.14,
                        ),
                        shares=3.14,
                    ),
                ],
            ),
            benchmarks=[
                OptimizerInputsPortfolio(
                    holdings=[
                        OptimizerInputsPortfolioItem(
                            univ_index=1,
                            price=OptimizerInputsAssetPrice(
                                source=OptimizerInputsAssetPriceEPriceSource(0),
                                price_override=3.14,
                            ),
                            shares=3.14,
                        ),
                    ],
                ),
            ],
            buylist=[
                OptimizerInputsBuyListItem(
                    univ_index=1,
                    price=OptimizerInputsAssetPrice(
                        source=OptimizerInputsAssetPriceEPriceSource(0),
                        price_override=3.14,
                    ),
                ),
            ],
            cash_univ_index=1,
        ),
        riskmodels=OptimizerInputsMultiPeriodRiskModels(
            risk_models=[
                OptimizerInputsRiskModelForPeriods(
                    risk_model=OptimizerInputsRiskModel(
                        simulated_risk_model=OptimizerInputsSimulatedRiskModel(
                            raw_data=VARDistributionDataMessage(
                                description=VARDistributionDescription(
                                    risk_model="risk_model_example",
                                    factor_group="factor_group_example",
                                    factors=[
                                        "factors_example",
                                    ],
                                    distribution_type=VARDistributionType(0),
                                    report_date=1,
                                    report_currency="report_currency_example",
                                    horizon_in_trading_days=3.14,
                                    return_dates=[
                                        1,
                                    ],
                                ),
                                security_simulations=[
                                    VARSimulatedReturns(
                                        entity="entity_example",
                                        returns=[
                                            3.14,
                                        ],
                                    ),
                                ],
                                status=VARDistributionStatus(
                                    indicator=VARStatusIndicator(0),
                                    message="message_example",
                                ),
                            ),
                            request_info=OptimizerInputsSimulatedRiskRequestInfo(
                                url="url_example",
                                lima_header="lima_header_example",
                            ),
                        ),
                        quant_risk_model=OptimizerInputsQuantRiskModel(
                            raw_data=OptimizerInputsQuantRiskModelRawData(
                                labels=OptimizerInputsLabels(
                                    factor=OptimizerInputsFactor(
                                        ids=[
                                            "ids_example",
                                        ],
                                        names=[
                                            "names_example",
                                        ],
                                    ),
                                    security=OptimizerInputsSecurity(
                                        ids=[
                                            "ids_example",
                                        ],
                                    ),
                                ),
                                raw_asset_covariance_matrix=OptimizerInputsSparseMatrix(
                                    rows=1,
                                    columns=1,
                                    index_pointer=[
                                        1,
                                    ],
                                    indices=[
                                        1,
                                    ],
                                    value=[
                                        3.14,
                                    ],
                                ),
                                raw_factor_exposure=OptimizerInputsSparseMatrix(
                                    rows=1,
                                    columns=1,
                                    index_pointer=[
                                        1,
                                    ],
                                    indices=[
                                        1,
                                    ],
                                    value=[
                                        3.14,
                                    ],
                                ),
                                raw_factor_covariance_matrix=OptimizerInputsDenseMatrix(
                                    value=[
                                        GoogleProtobufListValue(
                                            values=[
                                                OptimizerInputsValue(
                                                    value_type=OptimizerInputsEValueTypeEnum(0),
                                                    raw_value=3.14,
                                                    ref_index=1,
                                                ),
                                            ],
                                        ),
                                    ],
                                ),
                                risk_model_coverage_flag=[
                                    1,
                                ],
                            ),
                            request_info=OptimizerInputsQuantRiskRequestInfo(
                                service_url="service_url_example",
                                json_post_body="json_post_body_example",
                                lima_header="lima_header_example",
                                pickup_base_url="pickup_base_url_example",
                            ),
                        ),
                        raw_model=OptimizerInputsRawRiskModel(
                            simulations=[
                                OptimizerInputsRawRiskModelSimulations(
                                    id="id_example",
                                    simulated_returns=[
                                        3.14,
                                    ],
                                ),
                            ],
                        ),
                    ),
                    periods=OptimizerInputsOnPeriods(
                        periods=[
                            1,
                        ],
                    ),
                ),
            ],
        ),
        lookup_tables=OptimizerInputsLookupTables(
            groups=[
                OptimizerInputsGroupDefinition(
                    univ_indices=[
                        1,
                    ],
                ),
            ],
            values=[
                OptimizerInputsValueReference(
                    asset_values=3.14,
                ),
            ],
        ),
        output_statistics=True,
    ) # OptimizerInputsMultiPeriodInput | Multiperiod protobuf input (optional)

    try:
        # example passing only required values which don't have defaults set
        # and optional values
        api_response = api_instance.mpo_v1_optimize_fpo_post(multi_period_input=multi_period_input)

        pprint(api_response)
    except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:
        print("Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\n" % e)

    # # Get response, http status code and response headers
    # try:
    #     api_response, http_status_code, response_headers = api_instance.mpo_v1_optimize_fpo_post_with_http_info(multi_period_input=multi_period_input)


    #     pprint(api_response)
    #     pprint(http_status_code)
    #     pprint(response_headers)
    # except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:
    #     print("Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\n" % e)

    # # Get response asynchronous
    # try:
    #     async_result = api_instance.mpo_v1_optimize_fpo_post_async(multi_period_input=multi_period_input)
    #     api_response = async_result.get()


    #     pprint(api_response)
    # except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:
    #     print("Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\n" % e)

    # # Get response, http status code and response headers asynchronous
    # try:
    #     async_result = api_instance.mpo_v1_optimize_fpo_post_with_http_info_async(multi_period_input=multi_period_input)
    #     api_response, http_status_code, response_headers = async_result.get()


    #     pprint(api_response)
    #     pprint(http_status_code)
    #     pprint(response_headers)
    # except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:
    #     print("Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\n" % e)

```

### Using Pandas

To convert an API response to a Pandas DataFrame, it is necessary to transform it first to a dictionary.
```python
import pandas as pd

response_dict = api_response.to_dict()['data']

simple_json_response = pd.DataFrame(response_dict)
nested_json_response = pd.json_normalize(response_dict)
```

### Debugging

The SDK uses the standard library [`logging`](https://docs.python.org/3/library/logging.html#module-logging) module.

Setting `debug` to `True` on an instance of the `Configuration` class sets the log-level of related packages to `DEBUG`
and enables additional logging in Pythons [HTTP Client](https://docs.python.org/3/library/http.client.html).

**Note**: This prints out sensitive information (e.g. the full request and response). Use with care.

```python
import logging
import fds.sdk.OptimizationEngineAPIMultiperiod

logging.basicConfig(level=logging.DEBUG)

configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(...)
configuration.debug = True
```

### Configure a Proxy

You can pass proxy settings to the Configuration class:

* `proxy`: The URL of the proxy to use.
* `proxy_headers`: a dictionary to pass additional headers to the proxy (e.g. `Proxy-Authorization`).

```python
import fds.sdk.OptimizationEngineAPIMultiperiod

configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(
    # ...
    proxy="http://secret:password@localhost:5050",
    proxy_headers={
        "Custom-Proxy-Header": "Custom-Proxy-Header-Value"
    }
)
```

### Custom SSL Certificate

TLS/SSL certificate verification can be configured with the following Configuration parameters:

* `ssl_ca_cert`: a path to the certificate to use for verification in `PEM` format.
* `verify_ssl`: setting this to `False` disables the verification of certificates.
  Disabling the verification is not recommended, but it might be useful during
  local development or testing.

```python
import fds.sdk.OptimizationEngineAPIMultiperiod

configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(
    # ...
    ssl_ca_cert='/path/to/ca.pem'
)
```

### Request Retries

In case the request retry behaviour should be customized, it is possible to pass a `urllib3.Retry` object to the `retry` property of the Configuration.

```python
from urllib3 import Retry
import fds.sdk.OptimizationEngineAPIMultiperiod

configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(
    # ...
)

configuration.retries = Retry(total=3, status_forcelist=[500, 502, 503, 504])
```


## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**mpo_v1_optimize_fpo_post**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/DefaultApi.md#mpo_v1_optimize_fpo_post) | **POST** /mpo/v1/optimizeFPO | 


## Documentation For Models

 - [GoogleProtobufListValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufListValue.md)
 - [GoogleProtobufNullValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufNullValue.md)
 - [GoogleProtobufStruct](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufStruct.md)
 - [GoogleProtobufValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufValue.md)
 - [OptimizerInputsAcrossPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAcrossPeriods.md)
 - [OptimizerInputsAcrossPeriodsRollingPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAcrossPeriodsRollingPeriods.md)
 - [OptimizerInputsAsset](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAsset.md)
 - [OptimizerInputsAssetPrice](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAssetPrice.md)
 - [OptimizerInputsAssetPriceEPriceSource](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAssetPriceEPriceSource.md)
 - [OptimizerInputsBoundSourceEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsBoundSourceEnum.md)
 - [OptimizerInputsBuyListItem](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsBuyListItem.md)
 - [OptimizerInputsCompositeAsset](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsCompositeAsset.md)
 - [OptimizerInputsCompositeConstituent](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsCompositeConstituent.md)
 - [OptimizerInputsConstraintGroup](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsConstraintGroup.md)
 - [OptimizerInputsConstraints](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsConstraints.md)
 - [OptimizerInputsDenseMatrix](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDenseMatrix.md)
 - [OptimizerInputsDerivative](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDerivative.md)
 - [OptimizerInputsDerivativeFuture](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDerivativeFuture.md)
 - [OptimizerInputsDerivativeFutureEComputationMethodEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDerivativeFutureEComputationMethodEnum.md)
 - [OptimizerInputsDiversificationConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDiversificationConstraint.md)
 - [OptimizerInputsDiversificationRatioTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDiversificationRatioTerm.md)
 - [OptimizerInputsDrawdownTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDrawdownTerm.md)
 - [OptimizerInputsEAggregationMethodEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEAggregationMethodEnum.md)
 - [OptimizerInputsEAlphaUnitTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEAlphaUnitTypeEnum.md)
 - [OptimizerInputsEConstraintGroupTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintGroupTypeEnum.md)
 - [OptimizerInputsEConstraintLevelEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintLevelEnum.md)
 - [OptimizerInputsEConstraintPenaltyTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintPenaltyTypeEnum.md)
 - [OptimizerInputsEConstraintReturnTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintReturnTypeEnum.md)
 - [OptimizerInputsEConstraintRiskRelativeInterpretationTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintRiskRelativeInterpretationTypeEnum.md)
 - [OptimizerInputsEConstraintRiskTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintRiskTypeEnum.md)
 - [OptimizerInputsEConstraintTurnoverTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintTurnoverTypeEnum.md)
 - [OptimizerInputsEConstraintUnitTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintUnitTypeEnum.md)
 - [OptimizerInputsEConstraintValueTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintValueTypeEnum.md)
 - [OptimizerInputsEFPOConstraintAssetTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEFPOConstraintAssetTypeEnum.md)
 - [OptimizerInputsEFPOConstraintWeightTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEFPOConstraintWeightTypeEnum.md)
 - [OptimizerInputsELeverageValueTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsELeverageValueTypeEnum.md)
 - [OptimizerInputsEObjectiveRiskTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEObjectiveRiskTypeEnum.md)
 - [OptimizerInputsEObjectiveTermDirectionEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEObjectiveTermDirectionEnum.md)
 - [OptimizerInputsETransactionCostUnitTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsETransactionCostUnitTypeEnum.md)
 - [OptimizerInputsEValueTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEValueTypeEnum.md)
 - [OptimizerInputsEWeightingMethodTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEWeightingMethodTypeEnum.md)
 - [OptimizerInputsExpectedReturn](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedReturn.md)
 - [OptimizerInputsExpectedReturnConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedReturnConstraint.md)
 - [OptimizerInputsExpectedReturnTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedReturnTerm.md)
 - [OptimizerInputsExpectedTailLossTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedTailLossTerm.md)
 - [OptimizerInputsFactor](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactor.md)
 - [OptimizerInputsFactorExposureAttributes](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactorExposureAttributes.md)
 - [OptimizerInputsFactorExposureConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactorExposureConstraint.md)
 - [OptimizerInputsFactorExposureTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactorExposureTerm.md)
 - [OptimizerInputsFrontierSettings](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFrontierSettings.md)
 - [OptimizerInputsGeneralLinearConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsGeneralLinearConstraint.md)
 - [OptimizerInputsGeneralLinearTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsGeneralLinearTerm.md)
 - [OptimizerInputsGroupDefinition](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsGroupDefinition.md)
 - [OptimizerInputsHoldingsThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsHoldingsThresholdConstraint.md)
 - [OptimizerInputsHoldingsWeightConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsHoldingsWeightConstraint.md)
 - [OptimizerInputsLabels](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLabels.md)
 - [OptimizerInputsLeverageConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLeverageConstraint.md)
 - [OptimizerInputsLimitRiskETLConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLimitRiskETLConstraint.md)
 - [OptimizerInputsLimitTailRiskConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLimitTailRiskConstraint.md)
 - [OptimizerInputsLookupTables](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLookupTables.md)
 - [OptimizerInputsMPDiversificationConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPDiversificationConstraint.md)
 - [OptimizerInputsMPExpectedReturnConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPExpectedReturnConstraint.md)
 - [OptimizerInputsMPExpectedReturnTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPExpectedReturnTerm.md)
 - [OptimizerInputsMPFactorExposureConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPFactorExposureConstraint.md)
 - [OptimizerInputsMPFactorExposureTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPFactorExposureTerm.md)
 - [OptimizerInputsMPFrontierInput](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPFrontierInput.md)
 - [OptimizerInputsMPGeneralLinearConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPGeneralLinearConstraint.md)
 - [OptimizerInputsMPGeneralLinearTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPGeneralLinearTerm.md)
 - [OptimizerInputsMPHoldingsThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPHoldingsThresholdConstraint.md)
 - [OptimizerInputsMPHoldingsWeightConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPHoldingsWeightConstraint.md)
 - [OptimizerInputsMPLeverageConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPLeverageConstraint.md)
 - [OptimizerInputsMPLimitTailRiskConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPLimitTailRiskConstraint.md)
 - [OptimizerInputsMPNumberOfBuysConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPNumberOfBuysConstraint.md)
 - [OptimizerInputsMPNumberOfSellsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPNumberOfSellsConstraint.md)
 - [OptimizerInputsMPNumberofAssetsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPNumberofAssetsConstraint.md)
 - [OptimizerInputsMPObjectiveRatioTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPObjectiveRatioTerm.md)
 - [OptimizerInputsMPRiskContributionConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPRiskContributionConstraint.md)
 - [OptimizerInputsMPRiskVolatilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPRiskVolatilityConstraint.md)
 - [OptimizerInputsMPRoundlotsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPRoundlotsConstraint.md)
 - [OptimizerInputsMPSensitivityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPSensitivityConstraint.md)
 - [OptimizerInputsMPSensitivityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPSensitivityTerm.md)
 - [OptimizerInputsMPTailRiskTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTailRiskTerm.md)
 - [OptimizerInputsMPTargetProbabilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTargetProbabilityConstraint.md)
 - [OptimizerInputsMPTargetProbabilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTargetProbabilityTerm.md)
 - [OptimizerInputsMPTradeThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTradeThresholdConstraint.md)
 - [OptimizerInputsMPTransactionCostConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTransactionCostConstraint.md)
 - [OptimizerInputsMPTurnoverConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTurnoverConstraint.md)
 - [OptimizerInputsMPVolatilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPVolatilityTerm.md)
 - [OptimizerInputsMultiPeriodConstraints](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodConstraints.md)
 - [OptimizerInputsMultiPeriodInput](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodInput.md)
 - [OptimizerInputsMultiPeriodObjective](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodObjective.md)
 - [OptimizerInputsMultiPeriodOptions](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodOptions.md)
 - [OptimizerInputsMultiPeriodRiskModels](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodRiskModels.md)
 - [OptimizerInputsMultiPeriodStrategy](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodStrategy.md)
 - [OptimizerInputsNumberOfBuysConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsNumberOfBuysConstraint.md)
 - [OptimizerInputsNumberOfSellsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsNumberOfSellsConstraint.md)
 - [OptimizerInputsNumberofAssetsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsNumberofAssetsConstraint.md)
 - [OptimizerInputsObjective](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsObjective.md)
 - [OptimizerInputsOnPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsOnPeriods.md)
 - [OptimizerInputsOptions](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsOptions.md)
 - [OptimizerInputsPenalty](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPenalty.md)
 - [OptimizerInputsPortfolio](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPortfolio.md)
 - [OptimizerInputsPortfolioItem](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPortfolioItem.md)
 - [OptimizerInputsPortfolios](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPortfolios.md)
 - [OptimizerInputsQuantRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsQuantRiskModel.md)
 - [OptimizerInputsQuantRiskModelRawData](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsQuantRiskModelRawData.md)
 - [OptimizerInputsQuantRiskRequestInfo](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsQuantRiskRequestInfo.md)
 - [OptimizerInputsRange](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRange.md)
 - [OptimizerInputsRawRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRawRiskModel.md)
 - [OptimizerInputsRawRiskModelSimulations](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRawRiskModelSimulations.md)
 - [OptimizerInputsRiskContributionConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskContributionConstraint.md)
 - [OptimizerInputsRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskModel.md)
 - [OptimizerInputsRiskModelForPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskModelForPeriods.md)
 - [OptimizerInputsRiskParityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskParityTerm.md)
 - [OptimizerInputsRiskVolatilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskVolatilityConstraint.md)
 - [OptimizerInputsRollingMethodEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRollingMethodEnum.md)
 - [OptimizerInputsRoundlotsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRoundlotsConstraint.md)
 - [OptimizerInputsSTARRTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSTARRTerm.md)
 - [OptimizerInputsSecurity](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSecurity.md)
 - [OptimizerInputsSensitivityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSensitivityConstraint.md)
 - [OptimizerInputsSensitivityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSensitivityTerm.md)
 - [OptimizerInputsSharpeRatioTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSharpeRatioTerm.md)
 - [OptimizerInputsSimulatedRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSimulatedRiskModel.md)
 - [OptimizerInputsSimulatedRiskRequestInfo](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSimulatedRiskRequestInfo.md)
 - [OptimizerInputsSparseMatrix](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSparseMatrix.md)
 - [OptimizerInputsSpecificPoints](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSpecificPoints.md)
 - [OptimizerInputsStartEndRange](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsStartEndRange.md)
 - [OptimizerInputsTailRiskMeasureEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTailRiskMeasureEnum.md)
 - [OptimizerInputsTailRiskTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTailRiskTerm.md)
 - [OptimizerInputsTargetProbabilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTargetProbabilityConstraint.md)
 - [OptimizerInputsTargetProbabilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTargetProbabilityTerm.md)
 - [OptimizerInputsTotalUniverse](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTotalUniverse.md)
 - [OptimizerInputsTradeThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTradeThresholdConstraint.md)
 - [OptimizerInputsTradingLimitTradeConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTradingLimitTradeConstraint.md)
 - [OptimizerInputsTransactionCost](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTransactionCost.md)
 - [OptimizerInputsTransactionCostConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTransactionCostConstraint.md)
 - [OptimizerInputsTransactionCostTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTransactionCostTerm.md)
 - [OptimizerInputsTurnoverConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTurnoverConstraint.md)
 - [OptimizerInputsValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsValue.md)
 - [OptimizerInputsValueReference](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsValueReference.md)
 - [OptimizerInputsVolatilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsVolatilityTerm.md)
 - [OptimizerOutputsMultiPeriodOutput](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerOutputsMultiPeriodOutput.md)
 - [OptimizerOutputsPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerOutputsPeriods.md)
 - [VARDistributionDataMessage](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionDataMessage.md)
 - [VARDistributionDescription](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionDescription.md)
 - [VARDistributionStatus](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionStatus.md)
 - [VARDistributionType](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionType.md)
 - [VARSimulatedReturns](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARSimulatedReturns.md)
 - [VARStatusIndicator](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARStatusIndicator.md)


## Documentation For Authorization


## FactSetApiKey

- **Type**: HTTP basic authentication


## FactSetOAuth2

- **Type**: OAuth
- **Flow**: application
- **Authorization URL**: 
- **Scopes**: N/A


## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in fds.sdk.OptimizationEngineAPIMultiperiod.apis and fds.sdk.OptimizationEngineAPIMultiperiod.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from fds.sdk.OptimizationEngineAPIMultiperiod.api.default_api import DefaultApi`
- `from fds.sdk.OptimizationEngineAPIMultiperiod.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import fds.sdk.OptimizationEngineAPIMultiperiod
from fds.sdk.OptimizationEngineAPIMultiperiod.apis import *
from fds.sdk.OptimizationEngineAPIMultiperiod.models import *
```

## Contributing

Please refer to the [contributing guide](../../../../CONTRIBUTING.md).

## Copyright

Copyright 2022 FactSet Research Systems Inc

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.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1",
    "name": "fds.sdk.OptimizationEngineAPIMultiperiod",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "FactSet, API, SDK",
    "author": "FactSet Research Systems",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c2/b5/df9a202cd471b89e40a9ad6a241910d6f7278dadd7319361ede8ac62a7bd/fds.sdk.OptimizationEngineAPIMultiperiod-0.21.13.tar.gz",
    "platform": null,
    "description": "[![FactSet](https://raw.githubusercontent.com/factset/enterprise-sdk/main/docs/images/factset-logo.svg)](https://www.factset.com)\n\n# Optimization Engine API (Multi-period) client library for Python\n\n[![API Version](https://img.shields.io/badge/api-v1-blue)]()\n[![PyPi](https://img.shields.io/pypi/v/fds.sdk.OptimizationEngineAPIMultiperiod)](https://pypi.org/project/fds.sdk.OptimizationEngineAPIMultiperiod/)\n[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\nNo description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 1\n- SDK version: 0.21.13\n- Build package: org.openapitools.codegen.languages.PythonClientCodegen\n\n## Requirements\n\n* Python >= 3.7\n\n## Installation\n\n### Poetry\n\n```shell\npoetry add fds.sdk.utils fds.sdk.OptimizationEngineAPIMultiperiod==0.21.13\n```\n\n### pip\n\n```shell\npip install fds.sdk.utils fds.sdk.OptimizationEngineAPIMultiperiod==0.21.13\n```\n\n## Usage\n\n1. [Generate authentication credentials](../../../../README.md#authentication).\n2. Setup Python environment.\n   1. Install and activate python 3.7+. If you're using [pyenv](https://github.com/pyenv/pyenv):\n\n      ```sh\n      pyenv install 3.9.7\n      pyenv shell 3.9.7\n      ```\n\n   2. (optional) [Install poetry](https://python-poetry.org/docs/#installation).\n3. [Install dependencies](#installation).\n4. Run the following:\n\n> [!IMPORTANT]\n> The parameter variables defined below are just examples and may potentially contain non valid values. Please replace them with valid values.\n\n### Example Code\n\n```python\nfrom fds.sdk.utils.authentication import ConfidentialClient\n\nimport fds.sdk.OptimizationEngineAPIMultiperiod\nfrom fds.sdk.OptimizationEngineAPIMultiperiod.api import default_api\nfrom fds.sdk.OptimizationEngineAPIMultiperiod.models import *\nfrom dateutil.parser import parse as dateutil_parser\nfrom pprint import pprint\n\n# See configuration.py for a list of all supported configuration parameters.\n\n# Examples for each supported authentication method are below,\n# choose one that satisfies your use case.\n\n# (Preferred) OAuth 2.0: FactSetOAuth2\n# See https://github.com/FactSet/enterprise-sdk#oauth-20\n# for information on how to create the app-config.json file\n#\n# The confidential client instance should be reused in production environments.\n# See https://github.com/FactSet/enterprise-sdk-utils-python#authentication\n# for more information on using the ConfidentialClient class\nconfiguration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(\n    fds_oauth_client=ConfidentialClient('/path/to/app-config.json')\n)\n\n# Basic authentication: FactSetApiKey\n# See https://github.com/FactSet/enterprise-sdk#api-key\n# for information how to create an API key\n# configuration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(\n#     username='USERNAME-SERIAL',\n#     password='API-KEY'\n# )\n\n# Enter a context with an instance of the API client\nwith fds.sdk.OptimizationEngineAPIMultiperiod.ApiClient(configuration) as api_client:\n    # Create an instance of the API class\n    api_instance = default_api.DefaultApi(api_client)\n    multi_period_input = OptimizerInputsMultiPeriodInput(\n        strategy=OptimizerInputsMultiPeriodStrategy(\n            objective=OptimizerInputsMultiPeriodObjective(\n                factor_exposure=[\n                    OptimizerInputsMPFactorExposureTerm(\n                        term=OptimizerInputsFactorExposureTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            factors=[\n                                \"factors_example\",\n                            ],\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                volatility=[\n                    OptimizerInputsMPVolatilityTerm(\n                        term=OptimizerInputsVolatilityTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            risk_type=OptimizerInputsEObjectiveRiskTypeEnum(0),\n                            factors=[\n                                \"factors_example\",\n                            ],\n                            active_risk=True,\n                            benchmark_index=1,\n                        ),\n                        term_on=OptimizerInputsBoundSourceEnum(0),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                general_linear=[\n                    OptimizerInputsMPGeneralLinearTerm(\n                        term=OptimizerInputsGeneralLinearTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            attribute=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            method=OptimizerInputsEAggregationMethodEnum(0),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                expected_return=[\n                    OptimizerInputsMPExpectedReturnTerm(\n                        term=OptimizerInputsExpectedReturnTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            return_values=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            use_alpha=True,\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                        ),\n                        term_on=OptimizerInputsBoundSourceEnum(0),\n                        annualization_factor=3.14,\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                sensitivity=[\n                    OptimizerInputsMPSensitivityTerm(\n                        term=OptimizerInputsSensitivityTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            sensitivity_attribute=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                objective_ratio=OptimizerInputsMPObjectiveRatioTerm(\n                    sharpe_ratio=OptimizerInputsSharpeRatioTerm(\n                        name=\"name_example\",\n                        multiplier=OptimizerInputsValue(\n                            value_type=OptimizerInputsEValueTypeEnum(0),\n                            raw_value=3.14,\n                            ref_index=1,\n                        ),\n                        risk_free_rate=OptimizerInputsValue(\n                            value_type=OptimizerInputsEValueTypeEnum(0),\n                            raw_value=3.14,\n                            ref_index=1,\n                        ),\n                        direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                        active_risk=True,\n                        benchmark_index=1,\n                    ),\n                    starr=OptimizerInputsSTARRTerm(\n                        name=\"name_example\",\n                        multiplier=OptimizerInputsValue(\n                            value_type=OptimizerInputsEValueTypeEnum(0),\n                            raw_value=3.14,\n                            ref_index=1,\n                        ),\n                        risk_free_rate=OptimizerInputsValue(\n                            value_type=OptimizerInputsEValueTypeEnum(0),\n                            raw_value=3.14,\n                            ref_index=1,\n                        ),\n                        direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                        confidence_level=3.14,\n                        use_centered_etl=True,\n                        active_risk=True,\n                        benchmark_index=1,\n                    ),\n                    diversification_ratio=OptimizerInputsDiversificationRatioTerm(\n                        name=\"name_example\",\n                        multiplier=OptimizerInputsValue(\n                            value_type=OptimizerInputsEValueTypeEnum(0),\n                            raw_value=3.14,\n                            ref_index=1,\n                        ),\n                        direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                    ),\n                    on_periods=OptimizerInputsOnPeriods(\n                        periods=[\n                            1,\n                        ],\n                    ),\n                    across_periods=OptimizerInputsAcrossPeriods(\n                        start_period=1,\n                        end_period=1,\n                        rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                            frequency=1,\n                            method=OptimizerInputsRollingMethodEnum(0),\n                        ),\n                    ),\n                ),\n                tail_risk=[\n                    OptimizerInputsMPTailRiskTerm(\n                        term=OptimizerInputsTailRiskTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            risk_measure=OptimizerInputsTailRiskMeasureEnum(0),\n                            confidence_level=3.14,\n                            use_centered_etl=True,\n                            active_risk=True,\n                            benchmark_index=1,\n                        ),\n                        term_on=OptimizerInputsBoundSourceEnum(0),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                target_probability=[\n                    OptimizerInputsMPTargetProbabilityTerm(\n                        term=OptimizerInputsTargetProbabilityTerm(\n                            name=\"name_example\",\n                            multiplier=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            direction=OptimizerInputsEObjectiveTermDirectionEnum(0),\n                            threshold_min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            threshold_max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                        ),\n                        constrain_on=OptimizerInputsBoundSourceEnum(0),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n            ),\n            constraints=OptimizerInputsMultiPeriodConstraints(\n                expected_returns=[\n                    OptimizerInputsMPExpectedReturnConstraint(\n                        constraint=OptimizerInputsExpectedReturnConstraint(\n                            name=\"name_example\",\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            return_value=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            use_strategy_return_value=True,\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            return_type=OptimizerInputsEConstraintReturnTypeEnum(0),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                            hierarchy=1,\n                        ),\n                        constraint_on=OptimizerInputsBoundSourceEnum(0),\n                        annualization_factor=3.14,\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                diversification=[\n                    OptimizerInputsMPDiversificationConstraint(\n                        constraint=OptimizerInputsDiversificationConstraint(\n                            name=\"name_example\",\n                            asset_value=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max_percent=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                factor_exposures=[\n                    OptimizerInputsMPFactorExposureConstraint(\n                        constraint=OptimizerInputsFactorExposureConstraint(\n                            name=\"name_example\",\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                            factors=OptimizerInputsFactorExposureAttributes(\n                                min=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            hierarchy=1,\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                general_linear=[\n                    OptimizerInputsMPGeneralLinearConstraint(\n                        constraint=OptimizerInputsGeneralLinearConstraint(\n                            name=\"name_example\",\n                            security_attribute=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            weighting_method=OptimizerInputsEWeightingMethodTypeEnum(0),\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            hierarchy=1,\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                holding_threshold=[\n                    OptimizerInputsMPHoldingsThresholdConstraint(\n                        constraint=OptimizerInputsHoldingsThresholdConstraint(\n                            name=\"name_example\",\n                            custom_asset=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                leverage=[\n                    OptimizerInputsMPLeverageConstraint(\n                        constraint=OptimizerInputsLeverageConstraint(\n                            name=\"name_example\",\n                            value=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            value_type=OptimizerInputsELeverageValueTypeEnum(0),\n                            hierarchy=1,\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                num_of_assets=[\n                    OptimizerInputsMPNumberofAssetsConstraint(\n                        constraint=OptimizerInputsNumberofAssetsConstraint(\n                            name=\"name_example\",\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                sensitivity=[\n                    OptimizerInputsMPSensitivityConstraint(\n                        constraint=OptimizerInputsSensitivityConstraint(\n                            name=\"name_example\",\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            sensitivity_attribute=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                            hierarchy=1,\n                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                weight_constraint=[\n                    OptimizerInputsMPHoldingsWeightConstraint(\n                        constraint=OptimizerInputsHoldingsWeightConstraint(\n                            name=\"name_example\",\n                            custom_asset=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),\n                            weight_type=OptimizerInputsEFPOConstraintWeightTypeEnum(0),\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),\n                            rel_to_benchmark=True,\n                            benchmark_index=1,\n                            hierarchy=1,\n                            apply_only_to_direct=True,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                number_of_buys=[\n                    OptimizerInputsMPNumberOfBuysConstraint(\n                        constraint=OptimizerInputsNumberOfBuysConstraint(\n                            name=\"name_example\",\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                number_of_sells=[\n                    OptimizerInputsMPNumberOfSellsConstraint(\n                        constraint=OptimizerInputsNumberOfSellsConstraint(\n                            name=\"name_example\",\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                round_lots=[\n                    OptimizerInputsMPRoundlotsConstraint(\n                        constraint=OptimizerInputsRoundlotsConstraint(\n                            name=\"name_example\",\n                            asset_level=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            custom_asset=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),\n                            general_value=3.14,\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                trade_threshold=[\n                    OptimizerInputsMPTradeThresholdConstraint(\n                        constraint=OptimizerInputsTradeThresholdConstraint(\n                            name=\"name_example\",\n                            min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            custom_asset=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            unit=OptimizerInputsEConstraintUnitTypeEnum(0),\n                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                trading_turnover=[\n                    OptimizerInputsMPTurnoverConstraint(\n                        constraint=OptimizerInputsTurnoverConstraint(\n                            name=\"name_example\",\n                            max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            custom_asset=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            value_type=OptimizerInputsEConstraintValueTypeEnum(0),\n                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),\n                            turnover_type=OptimizerInputsEConstraintTurnoverTypeEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                risk_contribution=[\n                    OptimizerInputsMPRiskContributionConstraint(\n                        constraint=OptimizerInputsRiskContributionConstraint(\n                            name=\"name_example\",\n                            max_percent=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            custom_asset=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            asset_type=OptimizerInputsEFPOConstraintAssetTypeEnum(0),\n                            risk_type=OptimizerInputsEConstraintRiskTypeEnum(0),\n                            hierarchy=1,\n                        ),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                    ),\n                ],\n                risk_volatility=[\n                    OptimizerInputsMPRiskVolatilityConstraint(\n                        constraint=OptimizerInputsRiskVolatilityConstraint(\n                            name=\"name_example\",\n                            max_value_of_risk=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            level=OptimizerInputsEConstraintLevelEnum(0),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            groups=[\n                                OptimizerInputsConstraintGroup(\n                                    min=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    max=OptimizerInputsValue(\n                                        value_type=OptimizerInputsEValueTypeEnum(0),\n                                        raw_value=3.14,\n                                        ref_index=1,\n                                    ),\n                                    id=\"id_example\",\n                                    nested_groups=[],\n                                    group_lookup_index=1,\n                                ),\n                            ],\n                            risk_type=OptimizerInputsEConstraintRiskTypeEnum(0),\n                            active_risk=True,\n                            benchmark_index=1,\n                            hierarchy=1,\n                        ),\n                        constraint_on=OptimizerInputsBoundSourceEnum(0),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                tail_risk=[\n                    OptimizerInputsMPLimitTailRiskConstraint(\n                        constraint=OptimizerInputsLimitTailRiskConstraint(\n                            name=\"name_example\",\n                            risk_measure=OptimizerInputsTailRiskMeasureEnum(0),\n                            max_risk=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            confidence_level=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            penalty=OptimizerInputsPenalty(\n                                enabled=True,\n                                penalty_type=OptimizerInputsEConstraintPenaltyTypeEnum(0),\n                                penalty_value=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                                max_violation=OptimizerInputsValue(\n                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                    raw_value=3.14,\n                                    ref_index=1,\n                                ),\n                            ),\n                            active_risk=True,\n                            benchmark_index=1,\n                            hierarchy=1,\n                        ),\n                        constraint_on=OptimizerInputsBoundSourceEnum(0),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n                target_probability=[\n                    OptimizerInputsMPTargetProbabilityConstraint(\n                        constraint=OptimizerInputsTargetProbabilityConstraint(\n                            name=\"name_example\",\n                            threshold_min=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            threshold_max=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            min_probability=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            max_probability=OptimizerInputsValue(\n                                value_type=OptimizerInputsEValueTypeEnum(0),\n                                raw_value=3.14,\n                                ref_index=1,\n                            ),\n                            hierarchy=1,\n                        ),\n                        constraint_on=OptimizerInputsBoundSourceEnum(0),\n                        on_periods=OptimizerInputsOnPeriods(\n                            periods=[\n                                1,\n                            ],\n                        ),\n                        across_periods=OptimizerInputsAcrossPeriods(\n                            start_period=1,\n                            end_period=1,\n                            rolling=OptimizerInputsAcrossPeriodsRollingPeriods(\n                                frequency=1,\n                                method=OptimizerInputsRollingMethodEnum(0),\n                            ),\n                        ),\n                    ),\n                ],\n            ),\n            transaction_cost=OptimizerInputsTransactionCost(\n                unit_type=OptimizerInputsETransactionCostUnitTypeEnum(0),\n                buy_cost=OptimizerInputsValue(\n                    value_type=OptimizerInputsEValueTypeEnum(0),\n                    raw_value=3.14,\n                    ref_index=1,\n                ),\n                sell_cost=OptimizerInputsValue(\n                    value_type=OptimizerInputsEValueTypeEnum(0),\n                    raw_value=3.14,\n                    ref_index=1,\n                ),\n            ),\n            options=OptimizerInputsMultiPeriodOptions(\n                options=OptimizerInputsOptions(\n                    max_run_time=1,\n                    convergence_tolerance=3.14,\n                    cash_flow_formula=OptimizerInputsValue(\n                        value_type=OptimizerInputsEValueTypeEnum(0),\n                        raw_value=3.14,\n                        ref_index=1,\n                    ),\n                    convert_weights_to_cash_for_ip=True,\n                    convert_weights_to_cash_for_bmk=True,\n                    composite_asset_lookthrough_level=1,\n                ),\n                weight_rebalance_periods=[\n                    1,\n                ],\n                total_periods_count=1,\n                initial_point_randomization_count=1,\n            ),\n            expected_return=OptimizerInputsExpectedReturn(\n                alpha=OptimizerInputsValue(\n                    value_type=OptimizerInputsEValueTypeEnum(0),\n                    raw_value=3.14,\n                    ref_index=1,\n                ),\n                alpha_unit=OptimizerInputsEAlphaUnitTypeEnum(0),\n            ),\n        ),\n        universe=OptimizerInputsTotalUniverse(\n            assets=[\n                OptimizerInputsAsset(\n                    symbol=\"symbol_example\",\n                    price=3.14,\n                ),\n            ],\n            composite_assets=OptimizerInputsCompositeAsset(\n                constituents=[\n                    OptimizerInputsCompositeConstituent(\n                        univ_index=1,\n                        weight=3.14,\n                        price=OptimizerInputsAssetPrice(\n                            source=OptimizerInputsAssetPriceEPriceSource(0),\n                            price_override=3.14,\n                        ),\n                    ),\n                ],\n            ),\n            derivatives=OptimizerInputsDerivative(\n                offset_index=1,\n                future=OptimizerInputsDerivativeFuture(\n                    contract_size=3.14,\n                    method=OptimizerInputsDerivativeFutureEComputationMethodEnum(0),\n                    using_pa_multiply=True,\n                ),\n                forward=True,\n            ),\n        ),\n        portfolios=OptimizerInputsPortfolios(\n            initial=OptimizerInputsPortfolio(\n                holdings=[\n                    OptimizerInputsPortfolioItem(\n                        univ_index=1,\n                        price=OptimizerInputsAssetPrice(\n                            source=OptimizerInputsAssetPriceEPriceSource(0),\n                            price_override=3.14,\n                        ),\n                        shares=3.14,\n                    ),\n                ],\n            ),\n            benchmarks=[\n                OptimizerInputsPortfolio(\n                    holdings=[\n                        OptimizerInputsPortfolioItem(\n                            univ_index=1,\n                            price=OptimizerInputsAssetPrice(\n                                source=OptimizerInputsAssetPriceEPriceSource(0),\n                                price_override=3.14,\n                            ),\n                            shares=3.14,\n                        ),\n                    ],\n                ),\n            ],\n            buylist=[\n                OptimizerInputsBuyListItem(\n                    univ_index=1,\n                    price=OptimizerInputsAssetPrice(\n                        source=OptimizerInputsAssetPriceEPriceSource(0),\n                        price_override=3.14,\n                    ),\n                ),\n            ],\n            cash_univ_index=1,\n        ),\n        riskmodels=OptimizerInputsMultiPeriodRiskModels(\n            risk_models=[\n                OptimizerInputsRiskModelForPeriods(\n                    risk_model=OptimizerInputsRiskModel(\n                        simulated_risk_model=OptimizerInputsSimulatedRiskModel(\n                            raw_data=VARDistributionDataMessage(\n                                description=VARDistributionDescription(\n                                    risk_model=\"risk_model_example\",\n                                    factor_group=\"factor_group_example\",\n                                    factors=[\n                                        \"factors_example\",\n                                    ],\n                                    distribution_type=VARDistributionType(0),\n                                    report_date=1,\n                                    report_currency=\"report_currency_example\",\n                                    horizon_in_trading_days=3.14,\n                                    return_dates=[\n                                        1,\n                                    ],\n                                ),\n                                security_simulations=[\n                                    VARSimulatedReturns(\n                                        entity=\"entity_example\",\n                                        returns=[\n                                            3.14,\n                                        ],\n                                    ),\n                                ],\n                                status=VARDistributionStatus(\n                                    indicator=VARStatusIndicator(0),\n                                    message=\"message_example\",\n                                ),\n                            ),\n                            request_info=OptimizerInputsSimulatedRiskRequestInfo(\n                                url=\"url_example\",\n                                lima_header=\"lima_header_example\",\n                            ),\n                        ),\n                        quant_risk_model=OptimizerInputsQuantRiskModel(\n                            raw_data=OptimizerInputsQuantRiskModelRawData(\n                                labels=OptimizerInputsLabels(\n                                    factor=OptimizerInputsFactor(\n                                        ids=[\n                                            \"ids_example\",\n                                        ],\n                                        names=[\n                                            \"names_example\",\n                                        ],\n                                    ),\n                                    security=OptimizerInputsSecurity(\n                                        ids=[\n                                            \"ids_example\",\n                                        ],\n                                    ),\n                                ),\n                                raw_asset_covariance_matrix=OptimizerInputsSparseMatrix(\n                                    rows=1,\n                                    columns=1,\n                                    index_pointer=[\n                                        1,\n                                    ],\n                                    indices=[\n                                        1,\n                                    ],\n                                    value=[\n                                        3.14,\n                                    ],\n                                ),\n                                raw_factor_exposure=OptimizerInputsSparseMatrix(\n                                    rows=1,\n                                    columns=1,\n                                    index_pointer=[\n                                        1,\n                                    ],\n                                    indices=[\n                                        1,\n                                    ],\n                                    value=[\n                                        3.14,\n                                    ],\n                                ),\n                                raw_factor_covariance_matrix=OptimizerInputsDenseMatrix(\n                                    value=[\n                                        GoogleProtobufListValue(\n                                            values=[\n                                                OptimizerInputsValue(\n                                                    value_type=OptimizerInputsEValueTypeEnum(0),\n                                                    raw_value=3.14,\n                                                    ref_index=1,\n                                                ),\n                                            ],\n                                        ),\n                                    ],\n                                ),\n                                risk_model_coverage_flag=[\n                                    1,\n                                ],\n                            ),\n                            request_info=OptimizerInputsQuantRiskRequestInfo(\n                                service_url=\"service_url_example\",\n                                json_post_body=\"json_post_body_example\",\n                                lima_header=\"lima_header_example\",\n                                pickup_base_url=\"pickup_base_url_example\",\n                            ),\n                        ),\n                        raw_model=OptimizerInputsRawRiskModel(\n                            simulations=[\n                                OptimizerInputsRawRiskModelSimulations(\n                                    id=\"id_example\",\n                                    simulated_returns=[\n                                        3.14,\n                                    ],\n                                ),\n                            ],\n                        ),\n                    ),\n                    periods=OptimizerInputsOnPeriods(\n                        periods=[\n                            1,\n                        ],\n                    ),\n                ),\n            ],\n        ),\n        lookup_tables=OptimizerInputsLookupTables(\n            groups=[\n                OptimizerInputsGroupDefinition(\n                    univ_indices=[\n                        1,\n                    ],\n                ),\n            ],\n            values=[\n                OptimizerInputsValueReference(\n                    asset_values=3.14,\n                ),\n            ],\n        ),\n        output_statistics=True,\n    ) # OptimizerInputsMultiPeriodInput | Multiperiod protobuf input (optional)\n\n    try:\n        # example passing only required values which don't have defaults set\n        # and optional values\n        api_response = api_instance.mpo_v1_optimize_fpo_post(multi_period_input=multi_period_input)\n\n        pprint(api_response)\n    except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:\n        print(\"Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\\n\" % e)\n\n    # # Get response, http status code and response headers\n    # try:\n    #     api_response, http_status_code, response_headers = api_instance.mpo_v1_optimize_fpo_post_with_http_info(multi_period_input=multi_period_input)\n\n\n    #     pprint(api_response)\n    #     pprint(http_status_code)\n    #     pprint(response_headers)\n    # except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:\n    #     print(\"Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\\n\" % e)\n\n    # # Get response asynchronous\n    # try:\n    #     async_result = api_instance.mpo_v1_optimize_fpo_post_async(multi_period_input=multi_period_input)\n    #     api_response = async_result.get()\n\n\n    #     pprint(api_response)\n    # except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:\n    #     print(\"Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\\n\" % e)\n\n    # # Get response, http status code and response headers asynchronous\n    # try:\n    #     async_result = api_instance.mpo_v1_optimize_fpo_post_with_http_info_async(multi_period_input=multi_period_input)\n    #     api_response, http_status_code, response_headers = async_result.get()\n\n\n    #     pprint(api_response)\n    #     pprint(http_status_code)\n    #     pprint(response_headers)\n    # except fds.sdk.OptimizationEngineAPIMultiperiod.ApiException as e:\n    #     print(\"Exception when calling DefaultApi->mpo_v1_optimize_fpo_post: %s\\n\" % e)\n\n```\n\n### Using Pandas\n\nTo convert an API response to a Pandas DataFrame, it is necessary to transform it first to a dictionary.\n```python\nimport pandas as pd\n\nresponse_dict = api_response.to_dict()['data']\n\nsimple_json_response = pd.DataFrame(response_dict)\nnested_json_response = pd.json_normalize(response_dict)\n```\n\n### Debugging\n\nThe SDK uses the standard library [`logging`](https://docs.python.org/3/library/logging.html#module-logging) module.\n\nSetting `debug` to `True` on an instance of the `Configuration` class sets the log-level of related packages to `DEBUG`\nand enables additional logging in Pythons [HTTP Client](https://docs.python.org/3/library/http.client.html).\n\n**Note**: This prints out sensitive information (e.g. the full request and response). Use with care.\n\n```python\nimport logging\nimport fds.sdk.OptimizationEngineAPIMultiperiod\n\nlogging.basicConfig(level=logging.DEBUG)\n\nconfiguration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(...)\nconfiguration.debug = True\n```\n\n### Configure a Proxy\n\nYou can pass proxy settings to the Configuration class:\n\n* `proxy`: The URL of the proxy to use.\n* `proxy_headers`: a dictionary to pass additional headers to the proxy (e.g. `Proxy-Authorization`).\n\n```python\nimport fds.sdk.OptimizationEngineAPIMultiperiod\n\nconfiguration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(\n    # ...\n    proxy=\"http://secret:password@localhost:5050\",\n    proxy_headers={\n        \"Custom-Proxy-Header\": \"Custom-Proxy-Header-Value\"\n    }\n)\n```\n\n### Custom SSL Certificate\n\nTLS/SSL certificate verification can be configured with the following Configuration parameters:\n\n* `ssl_ca_cert`: a path to the certificate to use for verification in `PEM` format.\n* `verify_ssl`: setting this to `False` disables the verification of certificates.\n  Disabling the verification is not recommended, but it might be useful during\n  local development or testing.\n\n```python\nimport fds.sdk.OptimizationEngineAPIMultiperiod\n\nconfiguration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(\n    # ...\n    ssl_ca_cert='/path/to/ca.pem'\n)\n```\n\n### Request Retries\n\nIn case the request retry behaviour should be customized, it is possible to pass a `urllib3.Retry` object to the `retry` property of the Configuration.\n\n```python\nfrom urllib3 import Retry\nimport fds.sdk.OptimizationEngineAPIMultiperiod\n\nconfiguration = fds.sdk.OptimizationEngineAPIMultiperiod.Configuration(\n    # ...\n)\n\nconfiguration.retries = Retry(total=3, status_forcelist=[500, 502, 503, 504])\n```\n\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *http://localhost*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*DefaultApi* | [**mpo_v1_optimize_fpo_post**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/DefaultApi.md#mpo_v1_optimize_fpo_post) | **POST** /mpo/v1/optimizeFPO | \n\n\n## Documentation For Models\n\n - [GoogleProtobufListValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufListValue.md)\n - [GoogleProtobufNullValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufNullValue.md)\n - [GoogleProtobufStruct](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufStruct.md)\n - [GoogleProtobufValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/GoogleProtobufValue.md)\n - [OptimizerInputsAcrossPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAcrossPeriods.md)\n - [OptimizerInputsAcrossPeriodsRollingPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAcrossPeriodsRollingPeriods.md)\n - [OptimizerInputsAsset](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAsset.md)\n - [OptimizerInputsAssetPrice](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAssetPrice.md)\n - [OptimizerInputsAssetPriceEPriceSource](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsAssetPriceEPriceSource.md)\n - [OptimizerInputsBoundSourceEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsBoundSourceEnum.md)\n - [OptimizerInputsBuyListItem](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsBuyListItem.md)\n - [OptimizerInputsCompositeAsset](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsCompositeAsset.md)\n - [OptimizerInputsCompositeConstituent](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsCompositeConstituent.md)\n - [OptimizerInputsConstraintGroup](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsConstraintGroup.md)\n - [OptimizerInputsConstraints](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsConstraints.md)\n - [OptimizerInputsDenseMatrix](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDenseMatrix.md)\n - [OptimizerInputsDerivative](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDerivative.md)\n - [OptimizerInputsDerivativeFuture](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDerivativeFuture.md)\n - [OptimizerInputsDerivativeFutureEComputationMethodEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDerivativeFutureEComputationMethodEnum.md)\n - [OptimizerInputsDiversificationConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDiversificationConstraint.md)\n - [OptimizerInputsDiversificationRatioTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDiversificationRatioTerm.md)\n - [OptimizerInputsDrawdownTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsDrawdownTerm.md)\n - [OptimizerInputsEAggregationMethodEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEAggregationMethodEnum.md)\n - [OptimizerInputsEAlphaUnitTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEAlphaUnitTypeEnum.md)\n - [OptimizerInputsEConstraintGroupTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintGroupTypeEnum.md)\n - [OptimizerInputsEConstraintLevelEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintLevelEnum.md)\n - [OptimizerInputsEConstraintPenaltyTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintPenaltyTypeEnum.md)\n - [OptimizerInputsEConstraintReturnTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintReturnTypeEnum.md)\n - [OptimizerInputsEConstraintRiskRelativeInterpretationTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintRiskRelativeInterpretationTypeEnum.md)\n - [OptimizerInputsEConstraintRiskTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintRiskTypeEnum.md)\n - [OptimizerInputsEConstraintTurnoverTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintTurnoverTypeEnum.md)\n - [OptimizerInputsEConstraintUnitTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintUnitTypeEnum.md)\n - [OptimizerInputsEConstraintValueTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEConstraintValueTypeEnum.md)\n - [OptimizerInputsEFPOConstraintAssetTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEFPOConstraintAssetTypeEnum.md)\n - [OptimizerInputsEFPOConstraintWeightTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEFPOConstraintWeightTypeEnum.md)\n - [OptimizerInputsELeverageValueTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsELeverageValueTypeEnum.md)\n - [OptimizerInputsEObjectiveRiskTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEObjectiveRiskTypeEnum.md)\n - [OptimizerInputsEObjectiveTermDirectionEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEObjectiveTermDirectionEnum.md)\n - [OptimizerInputsETransactionCostUnitTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsETransactionCostUnitTypeEnum.md)\n - [OptimizerInputsEValueTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEValueTypeEnum.md)\n - [OptimizerInputsEWeightingMethodTypeEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsEWeightingMethodTypeEnum.md)\n - [OptimizerInputsExpectedReturn](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedReturn.md)\n - [OptimizerInputsExpectedReturnConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedReturnConstraint.md)\n - [OptimizerInputsExpectedReturnTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedReturnTerm.md)\n - [OptimizerInputsExpectedTailLossTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsExpectedTailLossTerm.md)\n - [OptimizerInputsFactor](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactor.md)\n - [OptimizerInputsFactorExposureAttributes](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactorExposureAttributes.md)\n - [OptimizerInputsFactorExposureConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactorExposureConstraint.md)\n - [OptimizerInputsFactorExposureTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFactorExposureTerm.md)\n - [OptimizerInputsFrontierSettings](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsFrontierSettings.md)\n - [OptimizerInputsGeneralLinearConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsGeneralLinearConstraint.md)\n - [OptimizerInputsGeneralLinearTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsGeneralLinearTerm.md)\n - [OptimizerInputsGroupDefinition](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsGroupDefinition.md)\n - [OptimizerInputsHoldingsThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsHoldingsThresholdConstraint.md)\n - [OptimizerInputsHoldingsWeightConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsHoldingsWeightConstraint.md)\n - [OptimizerInputsLabels](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLabels.md)\n - [OptimizerInputsLeverageConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLeverageConstraint.md)\n - [OptimizerInputsLimitRiskETLConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLimitRiskETLConstraint.md)\n - [OptimizerInputsLimitTailRiskConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLimitTailRiskConstraint.md)\n - [OptimizerInputsLookupTables](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsLookupTables.md)\n - [OptimizerInputsMPDiversificationConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPDiversificationConstraint.md)\n - [OptimizerInputsMPExpectedReturnConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPExpectedReturnConstraint.md)\n - [OptimizerInputsMPExpectedReturnTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPExpectedReturnTerm.md)\n - [OptimizerInputsMPFactorExposureConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPFactorExposureConstraint.md)\n - [OptimizerInputsMPFactorExposureTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPFactorExposureTerm.md)\n - [OptimizerInputsMPFrontierInput](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPFrontierInput.md)\n - [OptimizerInputsMPGeneralLinearConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPGeneralLinearConstraint.md)\n - [OptimizerInputsMPGeneralLinearTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPGeneralLinearTerm.md)\n - [OptimizerInputsMPHoldingsThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPHoldingsThresholdConstraint.md)\n - [OptimizerInputsMPHoldingsWeightConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPHoldingsWeightConstraint.md)\n - [OptimizerInputsMPLeverageConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPLeverageConstraint.md)\n - [OptimizerInputsMPLimitTailRiskConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPLimitTailRiskConstraint.md)\n - [OptimizerInputsMPNumberOfBuysConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPNumberOfBuysConstraint.md)\n - [OptimizerInputsMPNumberOfSellsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPNumberOfSellsConstraint.md)\n - [OptimizerInputsMPNumberofAssetsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPNumberofAssetsConstraint.md)\n - [OptimizerInputsMPObjectiveRatioTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPObjectiveRatioTerm.md)\n - [OptimizerInputsMPRiskContributionConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPRiskContributionConstraint.md)\n - [OptimizerInputsMPRiskVolatilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPRiskVolatilityConstraint.md)\n - [OptimizerInputsMPRoundlotsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPRoundlotsConstraint.md)\n - [OptimizerInputsMPSensitivityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPSensitivityConstraint.md)\n - [OptimizerInputsMPSensitivityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPSensitivityTerm.md)\n - [OptimizerInputsMPTailRiskTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTailRiskTerm.md)\n - [OptimizerInputsMPTargetProbabilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTargetProbabilityConstraint.md)\n - [OptimizerInputsMPTargetProbabilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTargetProbabilityTerm.md)\n - [OptimizerInputsMPTradeThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTradeThresholdConstraint.md)\n - [OptimizerInputsMPTransactionCostConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTransactionCostConstraint.md)\n - [OptimizerInputsMPTurnoverConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPTurnoverConstraint.md)\n - [OptimizerInputsMPVolatilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMPVolatilityTerm.md)\n - [OptimizerInputsMultiPeriodConstraints](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodConstraints.md)\n - [OptimizerInputsMultiPeriodInput](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodInput.md)\n - [OptimizerInputsMultiPeriodObjective](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodObjective.md)\n - [OptimizerInputsMultiPeriodOptions](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodOptions.md)\n - [OptimizerInputsMultiPeriodRiskModels](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodRiskModels.md)\n - [OptimizerInputsMultiPeriodStrategy](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsMultiPeriodStrategy.md)\n - [OptimizerInputsNumberOfBuysConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsNumberOfBuysConstraint.md)\n - [OptimizerInputsNumberOfSellsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsNumberOfSellsConstraint.md)\n - [OptimizerInputsNumberofAssetsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsNumberofAssetsConstraint.md)\n - [OptimizerInputsObjective](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsObjective.md)\n - [OptimizerInputsOnPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsOnPeriods.md)\n - [OptimizerInputsOptions](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsOptions.md)\n - [OptimizerInputsPenalty](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPenalty.md)\n - [OptimizerInputsPortfolio](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPortfolio.md)\n - [OptimizerInputsPortfolioItem](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPortfolioItem.md)\n - [OptimizerInputsPortfolios](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsPortfolios.md)\n - [OptimizerInputsQuantRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsQuantRiskModel.md)\n - [OptimizerInputsQuantRiskModelRawData](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsQuantRiskModelRawData.md)\n - [OptimizerInputsQuantRiskRequestInfo](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsQuantRiskRequestInfo.md)\n - [OptimizerInputsRange](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRange.md)\n - [OptimizerInputsRawRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRawRiskModel.md)\n - [OptimizerInputsRawRiskModelSimulations](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRawRiskModelSimulations.md)\n - [OptimizerInputsRiskContributionConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskContributionConstraint.md)\n - [OptimizerInputsRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskModel.md)\n - [OptimizerInputsRiskModelForPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskModelForPeriods.md)\n - [OptimizerInputsRiskParityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskParityTerm.md)\n - [OptimizerInputsRiskVolatilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRiskVolatilityConstraint.md)\n - [OptimizerInputsRollingMethodEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRollingMethodEnum.md)\n - [OptimizerInputsRoundlotsConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsRoundlotsConstraint.md)\n - [OptimizerInputsSTARRTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSTARRTerm.md)\n - [OptimizerInputsSecurity](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSecurity.md)\n - [OptimizerInputsSensitivityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSensitivityConstraint.md)\n - [OptimizerInputsSensitivityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSensitivityTerm.md)\n - [OptimizerInputsSharpeRatioTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSharpeRatioTerm.md)\n - [OptimizerInputsSimulatedRiskModel](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSimulatedRiskModel.md)\n - [OptimizerInputsSimulatedRiskRequestInfo](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSimulatedRiskRequestInfo.md)\n - [OptimizerInputsSparseMatrix](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSparseMatrix.md)\n - [OptimizerInputsSpecificPoints](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsSpecificPoints.md)\n - [OptimizerInputsStartEndRange](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsStartEndRange.md)\n - [OptimizerInputsTailRiskMeasureEnum](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTailRiskMeasureEnum.md)\n - [OptimizerInputsTailRiskTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTailRiskTerm.md)\n - [OptimizerInputsTargetProbabilityConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTargetProbabilityConstraint.md)\n - [OptimizerInputsTargetProbabilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTargetProbabilityTerm.md)\n - [OptimizerInputsTotalUniverse](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTotalUniverse.md)\n - [OptimizerInputsTradeThresholdConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTradeThresholdConstraint.md)\n - [OptimizerInputsTradingLimitTradeConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTradingLimitTradeConstraint.md)\n - [OptimizerInputsTransactionCost](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTransactionCost.md)\n - [OptimizerInputsTransactionCostConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTransactionCostConstraint.md)\n - [OptimizerInputsTransactionCostTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTransactionCostTerm.md)\n - [OptimizerInputsTurnoverConstraint](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsTurnoverConstraint.md)\n - [OptimizerInputsValue](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsValue.md)\n - [OptimizerInputsValueReference](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsValueReference.md)\n - [OptimizerInputsVolatilityTerm](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerInputsVolatilityTerm.md)\n - [OptimizerOutputsMultiPeriodOutput](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerOutputsMultiPeriodOutput.md)\n - [OptimizerOutputsPeriods](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/OptimizerOutputsPeriods.md)\n - [VARDistributionDataMessage](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionDataMessage.md)\n - [VARDistributionDescription](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionDescription.md)\n - [VARDistributionStatus](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionStatus.md)\n - [VARDistributionType](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARDistributionType.md)\n - [VARSimulatedReturns](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARSimulatedReturns.md)\n - [VARStatusIndicator](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1/docs/VARStatusIndicator.md)\n\n\n## Documentation For Authorization\n\n\n## FactSetApiKey\n\n- **Type**: HTTP basic authentication\n\n\n## FactSetOAuth2\n\n- **Type**: OAuth\n- **Flow**: application\n- **Authorization URL**: \n- **Scopes**: N/A\n\n\n## Notes for Large OpenAPI documents\nIf the OpenAPI document is large, imports in fds.sdk.OptimizationEngineAPIMultiperiod.apis and fds.sdk.OptimizationEngineAPIMultiperiod.models may fail with a\nRecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:\n\nSolution 1:\nUse specific imports for apis and models like:\n- `from fds.sdk.OptimizationEngineAPIMultiperiod.api.default_api import DefaultApi`\n- `from fds.sdk.OptimizationEngineAPIMultiperiod.model.pet import Pet`\n\nSolution 2:\nBefore importing the package, adjust the maximum recursion limit as shown below:\n```\nimport sys\nsys.setrecursionlimit(1500)\nimport fds.sdk.OptimizationEngineAPIMultiperiod\nfrom fds.sdk.OptimizationEngineAPIMultiperiod.apis import *\nfrom fds.sdk.OptimizationEngineAPIMultiperiod.models import *\n```\n\n## Contributing\n\nPlease refer to the [contributing guide](../../../../CONTRIBUTING.md).\n\n## Copyright\n\nCopyright 2022 FactSet Research Systems Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\n\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Optimization Engine API (Multi-period) client library for Python",
    "version": "0.21.13",
    "project_urls": {
        "Homepage": "https://github.com/FactSet/enterprise-sdk/tree/main/code/python/OptimizationEngineAPIMultiperiod/v1"
    },
    "split_keywords": [
        "factset",
        " api",
        " sdk"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef41593c24769801c3e128a9e8a21a2abd0feae84d1b55fab57b76a5a23921ee",
                "md5": "7dc10dea2adc9ac46b5b708b86979b84",
                "sha256": "d304ceb351e0e659f17dd595b3240b0955c9ac2f00d33842ccb9cb3547f5812b"
            },
            "downloads": -1,
            "filename": "fds.sdk.OptimizationEngineAPIMultiperiod-0.21.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7dc10dea2adc9ac46b5b708b86979b84",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 461282,
            "upload_time": "2024-11-01T10:13:14",
            "upload_time_iso_8601": "2024-11-01T10:13:14.255241Z",
            "url": "https://files.pythonhosted.org/packages/ef/41/593c24769801c3e128a9e8a21a2abd0feae84d1b55fab57b76a5a23921ee/fds.sdk.OptimizationEngineAPIMultiperiod-0.21.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c2b5df9a202cd471b89e40a9ad6a241910d6f7278dadd7319361ede8ac62a7bd",
                "md5": "1c4f6878716e7d55cb0006214bfb0d99",
                "sha256": "ba17e4d2a6215cf244a37659c1b4ecdd18db159b27e4694804054b43f7b5a334"
            },
            "downloads": -1,
            "filename": "fds.sdk.OptimizationEngineAPIMultiperiod-0.21.13.tar.gz",
            "has_sig": false,
            "md5_digest": "1c4f6878716e7d55cb0006214bfb0d99",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 121507,
            "upload_time": "2024-11-01T10:13:16",
            "upload_time_iso_8601": "2024-11-01T10:13:16.258904Z",
            "url": "https://files.pythonhosted.org/packages/c2/b5/df9a202cd471b89e40a9ad6a241910d6f7278dadd7319361ede8ac62a7bd/fds.sdk.OptimizationEngineAPIMultiperiod-0.21.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-01 10:13:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FactSet",
    "github_project": "enterprise-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fds.sdk.optimizationengineapimultiperiod"
}
        
Elapsed time: 0.41616s