股民个性化智能培训平台 - 风险管理

风险提示与教育 止损止盈设置 风险隔离

风险评估测试数据

                {
                  "scenario": "风险评估",
                  "testCases": [
                    {
                      "caseId": "RA_001",
                      "description": "新手用户,保守偏好,短期保本",
                      "input": {
                        "userType": "新手",
                        "riskPreference": "保守",
                        "investmentHorizon": "短期",
                        "goal": "保本",
                        "age": 25,
                        "income": 50000
                      },
                      "expectedOutput": {
                        "riskScore": 20,
                        "riskLevel": "保守型",
                        "recommendation": {
                          "products": ["货币基金", "国债"],
                          "courses": ["新手入门", "基金基础"]
                        }
                      },
                      "externalData": {
                          "marketConditions": "稳定",
                          "interestRate": 0.02
                      },
                      "collectedData": {
                          "pageViews": ["风险评估页面", "新手入门课程页面"],
                          "timeOnSite": 60
                      },
                      "businessData": {
                          "courseDifficulty": "入门",
                          "productRiskLevel": "低"
                      }
                    },
                    {
                      "caseId": "RA_002",
                      "description": "进阶用户,激进偏好,长期高收益",
                      "input": {
                        "userType": "进阶",
                        "riskPreference": "激进",
                        "investmentHorizon": "长期",
                        "goal": "高收益",
                        "age": 35,
                        "income": 150000
                      },
                      "expectedOutput": {
                        "riskScore": 80,
                        "riskLevel": "激进型",
                        "recommendation": {
                          "products": ["股票", "期权"],
                          "courses": ["高级技术分析", "量化交易"]
                        }
                      },
                      "externalData": {
                          "marketConditions": "波动",
                          "volatility": 0.15
                      },
                      "collectedData": {
                          "pageViews": ["技术分析页面", "期权交易页面"],
                          "timeOnSite": 180
                      },
                      "businessData": {
                          "courseDifficulty": "高级",
                          "productRiskLevel": "高"
                      }
                    }
                  ]
                }
            

模拟交易测试数据

                {
                  "scenario": "模拟交易",
                  "testCases": [
                    {
                      "caseId": "ST_001",
                      "description": "正常交易,设置止损止盈",
                      "input": {
                        "userType": "进阶",
                        "stockCode": "AAPL",
                        "action": "买入",
                        "quantity": 100,
                        "price": 150,
                        "stopLoss": 140,
                        "takeProfit": 160
                      },
                      "expectedOutput": {
                        "status": "成功",
                        "message": "交易成功",
                        "profitLoss": 0,
                        "riskWarnings": []
                      },
                      "externalData": {
                        "stockPrice": 150,
                        "marketVolatility": 0.05
                      },
                      "collectedData": {
                          "tradeFrequency": "中",
                          "averageHoldingTime": "短"
                      },
                      "businessData": {
                          "feeRate": 0.001,
                          "minFee": 5
                      }
                    },
                    {
                      "caseId": "ST_002",
                      "description": "高风险交易,未设置止损止盈",
                      "input": {
                        "userType": "新手",
                        "stockCode": "TSLA",
                        "action": "买入",
                        "quantity": 100,
                        "price": 800,
                        "stopLoss": 0,
                        "takeProfit": 0,
                        "leverage": 5
                      },
                      "expectedOutput": {
                        "status": "成功",
                        "message": "交易成功",
                        "profitLoss": 0,
                        "riskWarnings": ["未设置止损止盈", "高杠杆交易"]
                      },
                      "externalData": {
                        "stockPrice": 800,
                        "marketVolatility": 0.2
                      },
                      "collectedData": {
                          "tradeFrequency": "高",
                          "averageHoldingTime": "超短"
                      },
                      "businessData": {
                          "feeRate": 0.001,
                          "minFee": 5
                      }
                    },
                     {
                            "caseId": "ST_003",
                            "description": "达到止损价格",
                            "input": {
                                "userType": "新手",
                                "stockCode": "TSLA",
                                "action": "买入",
                                "quantity": 100,
                                "price": 800,
                                "stopLoss": 750,
                                "takeProfit": 900,
                                "leverage": 1
                            },
                            "expectedOutput": {
                                "status": "止损触发",
                                "message": "交易已止损",
                                "profitLoss": -5000,
                                "riskWarnings": []
                            },
                            "externalData": {
                                "stockPrice": 749, // 模拟股价下跌至止损位
                                "marketVolatility": 0.2
                            },
                            "collectedData": {
                                "tradeFrequency": "高",
                                "averageHoldingTime": "超短"
                            },
                            "businessData": {
                                "feeRate": 0.001,
                                "minFee": 5
                            }
                        }
                  ]
                }
            

策略推荐测试数据

                {
                  "scenario": "策略推荐",
                  "testCases": [
                    {
                      "caseId": "SR_001",
                      "description": "稳健型用户,推荐低风险策略",
                      "input": {
                        "userType": "稳健",
                        "riskPreference": "保守",
                        "investmentHorizon": "中长期",
                        "marketCondition": "震荡"
                      },
                      "expectedOutput": {
                        "recommendedStrategies": ["指数基金定投", "债券型基金"],
                        "strategyRisks": ["低", "低"]
                      },
                      "externalData": {
                          "marketTrend": "震荡",
                          "bondYield": 0.03
                      },
                      "collectedData": {
                          "strategyViews": ["指数基金页面", "债券基金页面"],
                          "timeOnStrategy": 30
                      },
                      "businessData": {
                          "strategyPerformance": ["稳健", "稳定"],
                          "strategyRiskAssessment": ["低", "低"]
                      }
                    },
                    {
                      "caseId": "SR_002",
                      "description": "激进型用户,推荐高风险策略",
                      "input": {
                        "userType": "激进",
                        "riskPreference": "激进",
                        "investmentHorizon": "短期",
                        "marketCondition": "牛市"
                      },
                      "expectedOutput": {
                        "recommendedStrategies": ["高杠杆短线交易", "期权组合"],
                        "strategyRisks": ["高", "高"]
                      },
                      "externalData": {
                          "marketTrend": "上涨",
                          "averageDailyVolume": 50000000
                      },
                      "collectedData": {
                          "strategyViews": ["高杠杆交易页面", "期权组合页面"],
                          "timeOnStrategy": 60
                      },
                      "businessData": {
                          "strategyPerformance": ["高收益", "高风险"],
                          "strategyRiskAssessment": ["高", "高"]
                      }
                    }
                  ]
                }
            

风险预警测试数据

                {
                  "scenario": "风险预警",
                  "testCases": [
                    {
                      "caseId": "RW_001",
                      "description": "持有某股票,公司发布负面公告",
                      "input": {
                        "userHoldings": ["AAPL"],
                        "newsTitle": "苹果公司发布盈利预警",
                        "newsContent": "苹果公司预计下季度盈利将大幅下降",
                        "source": "新浪财经",
                        "severity": "高"
                      },
                      "expectedOutput": {
                        "alertMessage": "您持有的股票AAPL发布盈利预警",
                        "riskLevel": "高",
                        "recommendation": "建议减仓或止损"
                      },
                      "externalData": {
                          "marketReaction": "下跌",
                          "tradingVolume": "放大"
                      },
                      "collectedData": {
                          "preAlertBehavior": "无异常",
                          "postAlertBehavior": "查看相关资讯"
                      },
                      "businessData": {
                          "expertOpinions": "盈利预警可能导致股价下跌"
                      }
                    },
                    {
                      "caseId": "RW_002",
                      "description": "未持有某股票,行业出现系统性风险",
                      "input": {
                        "userHoldings": [],
                        "newsTitle": "半导体行业面临产能过剩",
                        "newsContent": "多家半导体公司宣布减产",
                        "source": "华尔街见闻",
                        "severity": "中"
                      },
                      "expectedOutput": {
                        "alertMessage": "半导体行业面临产能过剩",
                        "riskLevel": "中",
                        "recommendation": "关注行业风险,谨慎投资"
                      },
                      "externalData": {
                          "marketReaction": "行业普跌",
                          "analystRatings": "下调"
                      },
                      "collectedData": {
                          "preAlertBehavior": "浏览半导体行业资讯",
                          "postAlertBehavior": "减少半导体行业相关策略"
                      },
                      "businessData": {
                          "expertOpinions": "行业风险可能蔓延至整个产业链"
                      }
                    }
                  ]
                }
            

异常行为检测测试数据

                {
                  "scenario": "异常行为检测",
                  "testCases": [
                    {
                      "caseId": "AB_001",
                      "description": "短时间内频繁交易陌生股票",
                      "input": {
                        "userType": "新手",
                        "tradeFrequency": "高",
                        "unknownStocks": "TSLA, NVDA, AMD",
                        "timeWindow": "5分钟",
                        "leverage": "1"
                      },
                      "expectedOutput": {
                        "alertMessage": "短时间内频繁交易陌生股票",
                        "riskLevel": "高",
                        "recommendation": "暂停交易,进行风险评估"
                      },
                      "externalData": {
                          "marketVolatility": 0.1
                      },
                      "collectedData": {
                          "previousTradeHistory": "低频交易",
                          "tradeAmountChange": "突增"
                      },
                      "businessData": {
                          "userBehaviorPatterns": "新手,不熟悉股票"
                      }
                    },
                    {
                      "caseId": "AB_002",
                      "description": "异地登录",
                      "input": {
                        "userType": "普通用户",
                        "loginLocation": "深圳",
                        "previousLoginLocation": "北京",
                        "timeSinceLastLogin": "24小时"
                      },
                      "expectedOutput": {
                        "alertMessage": "检测到异地登录",
                        "riskLevel": "中",
                        "recommendation": "验证身份,修改密码"
                      },
                      "externalData": {
                        "knownFraudCases": ["异地登录诈骗"]
                      },
                      "collectedData": {
                        "usualLoginTimes": ["早上", "下午"],
                        "loginTime": "凌晨"
                      },
                      "businessData": {
                        "deviceFingerprintChange": true
                      }
                    }
                  ]
                }