| """ | |
| QuantitativeAnalystDomain: Defines the capabilities and scope of the quantitative analyst expert. | |
| """ | |
| from typing import List, Dict | |
| from experts.domain import DomainBase | |
| class QuantitativeAnalystDomain(DomainBase): | |
| """Domain definition for quantitative analysis.""" | |
| def __init__(self): | |
| super().__init__() | |
| self.name = "quantitative_analyst" | |
| self.capabilities = [ | |
| "financial modeling", | |
| "algorithmic trading strategy", | |
| "statistical analysis", | |
| "portfolio optimization", | |
| "risk assessment", | |
| "quantitative research" | |
| ] | |
| def get_task_examples(self) -> List[Dict[str, str]]: | |
| """Get example tasks for this domain.""" | |
| return [ | |
| { | |
| "description": "Create a Monte Carlo simulation for stock price forecasting", | |
| "input": "Simulate daily stock prices for the next 30 days using historical volatility", | |
| "output": "Python code for Monte Carlo simulation with statistical analysis" | |
| }, | |
| { | |
| "description": "Optimize a portfolio using mean-variance optimization", | |
| "input": "Maximize returns while keeping risk below 10%", | |
| "output": "Optimal portfolio weights and risk metrics" | |
| }, | |
| { | |
| "description": "Implement a mean-reversion trading strategy", | |
| "input": "Design a strategy that profits from price deviations", | |
| "output": "Trading algorithm with risk management" | |
| } | |
| ] | |
| def get_description(self) -> str: | |
| """Get domain description.""" | |
| return """The Quantitative Analyst domain focuses on solving complex problems that require | |
| integration of mathematical analysis, financial understanding, and code generation. | |
| It's particularly suited for tasks involving: | |
| - Financial modeling and simulation | |
| - Algorithmic trading strategies | |
| - Portfolio optimization | |
| - Risk assessment | |
| - Statistical analysis of financial data | |
| - Quantitative research methods""" | |