File size: 2,181 Bytes
b3e9d26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
"""
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"""