fund_risk_stats_dolphin.sql 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. USE raw_db;
  2. -- DROP TABLE fund_risk_stats_dolphin;
  3. CREATE TABLE `fund_risk_stats_dolphin` (
  4. `fund_id` varchar(10) NOT NULL COMMENT '基金id',
  5. `end_date` varchar(7) NOT NULL COMMENT '截至日期',
  6. `stddev_6m` decimal(22,6) DEFAULT NULL,
  7. `downsidedev_6m` decimal(22,6) DEFAULT NULL,
  8. `alpha_6m` decimal(22,6) DEFAULT NULL,
  9. `winrate_6m` decimal(22,6) DEFAULT NULL,
  10. `beta_6m` decimal(22,6) DEFAULT NULL,
  11. `skewness_6m` decimal(22,6) DEFAULT NULL,
  12. `kurtosis_6m` decimal(22,6) DEFAULT NULL,
  13. `worstmonth_6m` decimal(22,6) DEFAULT NULL,
  14. `6m_maxdrawdown` decimal(22,6) DEFAULT NULL, -- mfdb正式表中 maxdrawdown_6m 是 6m_maxdrawdown 的虚拟列
  15. `stddev_1y` decimal(22,6) DEFAULT NULL,
  16. `downsidedev_1y` decimal(22,6) DEFAULT NULL,
  17. `alpha_1y` decimal(22,6) DEFAULT NULL,
  18. `winrate_1y` decimal(22,6) DEFAULT NULL,
  19. `beta_1y` decimal(22,6) DEFAULT NULL,
  20. `skewness_1y` decimal(22,6) DEFAULT NULL,
  21. `kurtosis_1y` decimal(22,6) DEFAULT NULL,
  22. `worstmonth_1y` decimal(22,6) DEFAULT NULL,
  23. `maxdrawdown_1y` decimal(22,6) DEFAULT NULL,
  24. `stddev_2y` decimal(22,6) DEFAULT NULL,
  25. `downsidedev_2y` decimal(22,6) DEFAULT NULL,
  26. `alpha_2y` decimal(22,6) DEFAULT NULL,
  27. `winrate_2y` decimal(22,6) DEFAULT NULL,
  28. `beta_2y` decimal(22,6) DEFAULT NULL,
  29. `skewness_2y` decimal(22,6) DEFAULT NULL,
  30. `kurtosis_2y` decimal(22,6) DEFAULT NULL,
  31. `worstmonth_2y` decimal(22,6) DEFAULT NULL,
  32. `maxdrawdown_2y` decimal(22,6) DEFAULT NULL,
  33. `stddev_3y` decimal(22,6) DEFAULT NULL,
  34. `downsidedev_3y` decimal(22,6) DEFAULT NULL,
  35. `alpha_3y` decimal(22,6) DEFAULT NULL,
  36. `winrate_3y` decimal(22,6) DEFAULT NULL,
  37. `beta_3y` decimal(22,6) DEFAULT NULL,
  38. `skewness_3y` decimal(22,6) DEFAULT NULL,
  39. `kurtosis_3y` decimal(22,6) DEFAULT NULL,
  40. `worstmonth_3y` decimal(22,6) DEFAULT NULL,
  41. `maxdrawdown_3y` decimal(22,6) DEFAULT NULL,
  42. `stddev_4y` decimal(22,6) DEFAULT NULL,
  43. `downsidedev_4y` decimal(22,6) DEFAULT NULL,
  44. `alpha_4y` decimal(22,6) DEFAULT NULL,
  45. `winrate_4y` decimal(22,6) DEFAULT NULL,
  46. `beta_4y` decimal(22,6) DEFAULT NULL,
  47. `skewness_4y` decimal(22,6) DEFAULT NULL,
  48. `kurtosis_4y` decimal(22,6) DEFAULT NULL,
  49. `worstmonth_4y` decimal(22,6) DEFAULT NULL,
  50. `maxdrawdown_4y` decimal(22,6) DEFAULT NULL,
  51. `stddev_5y` decimal(22,6) DEFAULT NULL,
  52. `downsidedev_5y` decimal(22,6) DEFAULT NULL,
  53. `alpha_5y` decimal(22,6) DEFAULT NULL,
  54. `winrate_5y` decimal(22,6) DEFAULT NULL,
  55. `beta_5y` decimal(22,6) DEFAULT NULL,
  56. `skewness_5y` decimal(22,6) DEFAULT NULL,
  57. `kurtosis_5y` decimal(22,6) DEFAULT NULL,
  58. `worstmonth_5y` decimal(22,6) DEFAULT NULL,
  59. `maxdrawdown_5y` decimal(22,6) DEFAULT NULL,
  60. `stddev_10y` decimal(22,6) DEFAULT NULL,
  61. `downsidedev_10y` decimal(22,6) DEFAULT NULL,
  62. `alpha_10y` decimal(22,6) DEFAULT NULL,
  63. `winrate_10y` decimal(22,6) DEFAULT NULL,
  64. `beta_10y` decimal(22,6) DEFAULT NULL,
  65. `skewness_10y` decimal(22,6) DEFAULT NULL,
  66. `kurtosis_10y` decimal(22,6) DEFAULT NULL,
  67. `worstmonth_10y` decimal(22,6) DEFAULT NULL,
  68. `maxdrawdown_10y` decimal(22,6) DEFAULT NULL,
  69. `stddev_ytd` decimal(22,6) DEFAULT NULL,
  70. `downsidedev_ytd` decimal(22,6) DEFAULT NULL,
  71. `alpha_ytd` decimal(22,6) DEFAULT NULL,
  72. `winrate_ytd` decimal(22,6) DEFAULT NULL,
  73. `beta_ytd` decimal(22,6) DEFAULT NULL,
  74. `skewness_ytd` decimal(22,6) DEFAULT NULL,
  75. `kurtosis_ytd` decimal(22,6) DEFAULT NULL,
  76. `worstmonth_ytd` decimal(22,6) DEFAULT NULL,
  77. `ytd_maxdrawdown` decimal(22,6) DEFAULT NULL, -- mfdb正式表中 maxdrawdown_ytd 是 ytd_maxdrawdown的虚拟列
  78. `stddev_incep` decimal(22,6) DEFAULT NULL,
  79. `downsidedev_incep` decimal(22,6) DEFAULT NULL,
  80. `alpha_incep` decimal(22,6) DEFAULT NULL,
  81. `winrate_incep` decimal(22,6) DEFAULT NULL,
  82. `beta_incep` decimal(22,6) DEFAULT NULL,
  83. `skewness_incep` decimal(22,6) DEFAULT NULL,
  84. `kurtosis_incep` decimal(22,6) DEFAULT NULL,
  85. `worstmonth_incep` decimal(22,6) DEFAULT NULL,
  86. `maxdrawdown_incep` decimal(22,6) DEFAULT NULL,
  87. PRIMARY KEY (`fund_id`,`end_date`)
  88. ) COMMENT='DolphinDB写回的基金历史风险指标表'