Spaces:
Runtime error
Runtime error
Download data/mock/finance_indicators.json from Macbath/indicator-modeling: direct link, hf CLI and curl.
- Browser
- Download file 9.53 kB
-
https://huggingface.co/spaces/Macbath/indicator-modeling/resolve/main/data/mock/finance_indicators.json
- Command line
-
hf download hf://spaces/Macbath/indicator-modeling/data/mock/finance_indicators.json
-
curl -L -o finance_indicators.json https://huggingface.co/spaces/Macbath/indicator-modeling/resolve/main/data/mock/finance_indicators.json
9.53 kB
| [ | |
| { | |
| "id": "finance_001", | |
| "name": "日均成交额", | |
| "description": "统计每天的交易总金额", | |
| "category": "交易指标", | |
| "sql_template": "SELECT DATE(trade_date) as date, SUM(trade_amount) as daily_volume FROM trades WHERE trade_date >= '{start_date}' GROUP BY DATE(trade_date) ORDER BY date", | |
| "dimensions": ["trade_date", "product_type"], | |
| "metrics": ["trade_amount"], | |
| "update_frequency": "每天" | |
| }, | |
| { | |
| "id": "finance_002", | |
| "name": "不良贷率", | |
| "description": "统计不良贷款占总贷款的比例", | |
| "category": "风险指标", | |
| "sql_template": "SELECT SUM(CASE WHEN loan_status = 'non_performing' THEN loan_amount ELSE 0 END) / SUM(loan_amount) as npl_ratio FROM loans", | |
| "dimensions": ["branch_id", "loan_type"], | |
| "metrics": ["loan_amount", "loan_status"], | |
| "update_frequency": "每月" | |
| }, | |
| { | |
| "id": "finance_003", | |
| "name": "净息差", | |
| "description": "统计利息收入与利息支出的差额占总资产的比例", | |
| "category": "盈利指标", | |
| "sql_template": "SELECT (SUM(interest_income) - SUM(interest_expense)) / SUM(total_assets) as net_interest_margin FROM financial_statements WHERE report_date >= '{start_date}'", | |
| "dimensions": ["report_date", "branch_id"], | |
| "metrics": ["interest_income", "interest_expense", "total_assets"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_004", | |
| "name": "资本充足率", | |
| "description": "统计资本总额与风险加权资产的比例", | |
| "category": "监管指标", | |
| "sql_template": "SELECT SUM(capital) / SUM(risk_weighted_assets) as car FROM regulatory_capital WHERE report_date = '{end_date}'", | |
| "dimensions": ["report_date", "institution_id"], | |
| "metrics": ["capital", "risk_weighted_assets"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_005", | |
| "name": "客户资产规模", | |
| "description": "统计每个客户的总资产规模", | |
| "category": "客户指标", | |
| "sql_template": "SELECT customer_id, SUM(deposit_amount + investment_amount) as total_assets FROM accounts JOIN investments ON accounts.customer_id = investments.customer_id GROUP BY customer_id", | |
| "dimensions": ["customer_id", "customer_type"], | |
| "metrics": ["deposit_amount", "investment_amount"], | |
| "update_frequency": "每天" | |
| }, | |
| { | |
| "id": "finance_006", | |
| "name": "交易成功率", | |
| "description": "统计成功完成的交易占总交易的比例", | |
| "category": "运营指标", | |
| "sql_template": "SELECT COUNT(DISTINCT CASE WHEN transaction_status = 'success' THEN transaction_id END) / COUNT(DISTINCT transaction_id) as success_rate FROM transactions", | |
| "dimensions": ["transaction_date", "channel"], | |
| "metrics": ["transaction_status"], | |
| "update_frequency": "实时" | |
| }, | |
| { | |
| "id": "finance_007", | |
| "name": "逾期率", | |
| "description": "统计逾期贷款占总贷款的比例", | |
| "category": "风险指标", | |
| "sql_template": "SELECT SUM(CASE WHEN DATEDIFF(NOW(), due_date) > 0 AND payment_status != 'paid' THEN loan_amount ELSE 0 END) / SUM(loan_amount) as overdue_rate FROM loans", | |
| "dimensions": ["loan_type", "branch_id"], | |
| "metrics": ["loan_amount", "due_date", "payment_status"], | |
| "update_frequency": "每天" | |
| }, | |
| { | |
| "id": "finance_008", | |
| "name": "净资产收益率", | |
| "description": "统计净利润占净资产的比例", | |
| "category": "盈利指标", | |
| "sql_template": "SELECT SUM(net_profit) / SUM(net_assets) as roe FROM financial_statements WHERE report_date >= '{start_date}'", | |
| "dimensions": ["report_date", "business_unit"], | |
| "metrics": ["net_profit", "net_assets"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_009", | |
| "name": "成本收入比", | |
| "description": "统计运营成本占营业收入的比例", | |
| "category": "效率指标", | |
| "sql_template": "SELECT SUM(operating_cost) / SUM(operating_income) as cost_income_ratio FROM financial_statements WHERE report_date >= '{start_date}'", | |
| "dimensions": ["report_date", "branch_id"], | |
| "metrics": ["operating_cost", "operating_income"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_010", | |
| "name": "客户流失率", | |
| "description": "统计销户或长期无交易的客户占比", | |
| "category": "客户指标", | |
| "sql_template": "SELECT COUNT(DISTINCT CASE WHEN DATEDIFF(NOW(), last_transaction_date) > 180 THEN customer_id END) / COUNT(DISTINCT customer_id) as churn_rate FROM customers", | |
| "dimensions": ["customer_type", "branch_id"], | |
| "metrics": ["last_transaction_date"], | |
| "update_frequency": "每月" | |
| }, | |
| { | |
| "id": "finance_011", | |
| "name": "拨备覆盖率", | |
| "description": "统计贷款损失准备金占不良贷款的比例", | |
| "category": "风险指标", | |
| "sql_template": "SELECT SUM(loan_loss_provision) / SUM(CASE WHEN loan_status = 'non_performing' THEN loan_amount ELSE 0 END) as provision_coverage FROM loans JOIN provisions ON loans.loan_id = provisions.loan_id", | |
| "dimensions": ["report_date", "branch_id"], | |
| "metrics": ["loan_loss_provision", "loan_amount", "loan_status"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_012", | |
| "name": "资产周转率", | |
| "description": "统计营业收入占总资产的比例", | |
| "category": "效率指标", | |
| "sql_template": "SELECT SUM(operating_income) / SUM(total_assets) as asset_turnover FROM financial_statements WHERE report_date >= '{start_date}'", | |
| "dimensions": ["report_date", "business_unit"], | |
| "metrics": ["operating_income", "total_assets"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_013", | |
| "name": "杠杆率", | |
| "description": "统计一级资本占表内外资产余额的比例", | |
| "category": "监管指标", | |
| "sql_template": "SELECT SUM(tier1_capital) / SUM(on_balance_sheet_assets + off_balance_sheet_assets) as leverage_ratio FROM regulatory_capital WHERE report_date = '{end_date}'", | |
| "dimensions": ["report_date", "institution_id"], | |
| "metrics": ["tier1_capital", "on_balance_sheet_assets", "off_balance_sheet_assets"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_014", | |
| "name": "净手续费收入", | |
| "description": "统计手续费及佣金净收入", | |
| "category": "盈利指标", | |
| "sql_template": "SELECT SUM(fee_income - fee_expense) as net_fee_income FROM income_statement WHERE report_date >= '{start_date}'", | |
| "dimensions": ["report_date", "product_type"], | |
| "metrics": ["fee_income", "fee_expense"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_015", | |
| "name": "流动性覆盖率", | |
| "description": "统计优质流动性资产占未来30天净流出量的比例", | |
| "category": "流动性指标", | |
| "sql_template": "SELECT SUM(high_quality_liquid_assets) / SUM(net_outflow_30d) as lcr FROM liquidity_metrics WHERE report_date = '{end_date}'", | |
| "dimensions": ["report_date", "institution_id"], | |
| "metrics": ["high_quality_liquid_assets", "net_outflow_30d"], | |
| "update_frequency": "每月" | |
| }, | |
| { | |
| "id": "finance_016", | |
| "name": "交易对手信用风险敞口", | |
| "description": "统计与交易对手的信用风险敞口总额", | |
| "category": "风险指标", | |
| "sql_template": "SELECT counterparty_id, SUM(exposure_amount) as total_exposure FROM counterparty_risk WHERE risk_type = 'credit' GROUP BY counterparty_id", | |
| "dimensions": ["counterparty_id", "risk_type"], | |
| "metrics": ["exposure_amount"], | |
| "update_frequency": "每月" | |
| }, | |
| { | |
| "id": "finance_017", | |
| "name": "净资产增长率", | |
| "description": "统计净资产的同比增长率", | |
| "category": "成长指标", | |
| "sql_template": "SELECT (SUM(CASE WHEN YEAR(report_date) = YEAR(NOW()) THEN net_assets ELSE 0 END) - SUM(CASE WHEN YEAR(report_date) = YEAR(NOW()) - 1 THEN net_assets ELSE 0 END)) / SUM(CASE WHEN YEAR(report_date) = YEAR(NOW()) - 1 THEN net_assets ELSE 0 END) as net_assets_growth FROM financial_statements", | |
| "dimensions": ["report_date", "business_unit"], | |
| "metrics": ["net_assets"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_018", | |
| "name": "不良贷款拨备率", | |
| "description": "统计不良贷款损失准备金占不良贷款余额的比例", | |
| "category": "风险指标", | |
| "sql_template": "SELECT SUM(provision_amount) / SUM(loan_amount) as npl_provision_ratio FROM loans JOIN provisions ON loans.loan_id = provisions.loan_id WHERE loan_status = 'non_performing'", | |
| "dimensions": ["report_date", "branch_id"], | |
| "metrics": ["provision_amount", "loan_amount", "loan_status"], | |
| "update_frequency": "每季度" | |
| }, | |
| { | |
| "id": "finance_019", | |
| "name": "客户满意度得分", | |
| "description": "统计客户调查的平均满意度评分", | |
| "category": "服务指标", | |
| "sql_template": "SELECT AVG(satisfaction_score) as avg_satisfaction FROM customer_surveys WHERE survey_date >= '{start_date}'", | |
| "dimensions": ["survey_date", "channel"], | |
| "metrics": ["satisfaction_score"], | |
| "update_frequency": "每月" | |
| }, | |
| { | |
| "id": "finance_020", | |
| "name": "资金成本率", | |
| "description": "统计利息支出占平均资金余额的比例", | |
| "category": "成本指标", | |
| "sql_template": "SELECT SUM(interest_expense) / AVG(funding_balance) as cost_of_funds FROM funding_costs WHERE report_date >= '{start_date}'", | |
| "dimensions": ["report_date", "funding_source"], | |
| "metrics": ["interest_expense", "funding_balance"], | |
| "update_frequency": "每月" | |
| } | |
| ] | |