# FinanceGPT generated client starter
# Source: FinanceGPT API v2 OpenAPI index
# OpenAPI SHA-256: 228f3cf999f801d03634f0dad1fc6d296671bc13a8cf0d80994b00a57b62f910
# Operations: post-investment-theme-watch-factors
# Credential: FINANCEGPT_API_KEY environment variable; no credential is embedded.
# Authority: API identity and generated code do not create model-promotion, QLM-binding or Financial Actions authority.

if not __import__('os').environ.get('FINANCEGPT_API_KEY'):
    raise RuntimeError('FINANCEGPT_API_KEY is required')

# Estimate point-in-time thematic factor returns | scope: investment:run
import json
import os
import requests

response = requests.request(
    'POST',
    'https://financegpt.dev/api/v2/investment/theme-watch/factors',
    headers={
        'Authorization': 'Bearer ' + os.environ['FINANCEGPT_API_KEY'],
        'Accept': 'application/json',
    },
    json=json.loads('{"as_of_date":"2026-08-16","history_months":36,"ridge_lambda":0.1000000000000000055511151231257827021181583404541015625,"minimum_symbols_per_factor":3,"max_factors":25,"max_symbols":120}'),
)
response.raise_for_status()
print(response.json())
