quantwise 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/.claude/skills/README.md +80 -0
  2. package/.claude/skills/backtest-expert/SKILL.md +206 -0
  3. package/.claude/skills/backtest-expert/references/failed_tests.md +236 -0
  4. package/.claude/skills/backtest-expert/references/methodology.md +227 -0
  5. package/.claude/skills/breadth-chart-analyst/SKILL.md +583 -0
  6. package/.claude/skills/breadth-chart-analyst/assets/SP500_Breadth_Index_200MA_8MA.jpeg +0 -0
  7. package/.claude/skills/breadth-chart-analyst/assets/US_Stock_Market_Uptrend_Ratio.jpeg +0 -0
  8. package/.claude/skills/breadth-chart-analyst/assets/breadth_analysis_template.md +558 -0
  9. package/.claude/skills/breadth-chart-analyst/references/breadth_chart_methodology.md +590 -0
  10. package/.claude/skills/canslim-screener/SKILL.md +599 -0
  11. package/.claude/skills/canslim-screener/references/canslim_methodology.md +606 -0
  12. package/.claude/skills/canslim-screener/references/fmp_api_endpoints.md +707 -0
  13. package/.claude/skills/canslim-screener/references/interpretation_guide.md +516 -0
  14. package/.claude/skills/canslim-screener/references/scoring_system.md +597 -0
  15. package/.claude/skills/canslim-screener/scripts/calculators/earnings_calculator.py +343 -0
  16. package/.claude/skills/canslim-screener/scripts/calculators/growth_calculator.py +334 -0
  17. package/.claude/skills/canslim-screener/scripts/calculators/institutional_calculator.py +347 -0
  18. package/.claude/skills/canslim-screener/scripts/calculators/leadership_calculator.py +380 -0
  19. package/.claude/skills/canslim-screener/scripts/calculators/market_calculator.py +244 -0
  20. package/.claude/skills/canslim-screener/scripts/calculators/new_highs_calculator.py +194 -0
  21. package/.claude/skills/canslim-screener/scripts/calculators/supply_demand_calculator.py +221 -0
  22. package/.claude/skills/canslim-screener/scripts/finviz_stock_client.py +227 -0
  23. package/.claude/skills/canslim-screener/scripts/fmp_client.py +393 -0
  24. package/.claude/skills/canslim-screener/scripts/report_generator.py +405 -0
  25. package/.claude/skills/canslim-screener/scripts/scorer.py +625 -0
  26. package/.claude/skills/canslim-screener/scripts/screen_canslim.py +361 -0
  27. package/.claude/skills/canslim-screener/scripts/test_institutional_endpoint.py +109 -0
  28. package/.claude/skills/chart/SKILL.md +20 -0
  29. package/.claude/skills/dividend-growth-pullback-screener/SKILL.md +322 -0
  30. package/.claude/skills/dividend-growth-pullback-screener/references/dividend_growth_compounding.md +400 -0
  31. package/.claude/skills/dividend-growth-pullback-screener/references/fmp_api_guide.md +642 -0
  32. package/.claude/skills/dividend-growth-pullback-screener/references/rsi_oversold_strategy.md +333 -0
  33. package/.claude/skills/dividend-growth-pullback-screener/scripts/screen_dividend_growth_rsi.py +1155 -0
  34. package/.claude/skills/earnings-calendar/SKILL.md +721 -0
  35. package/.claude/skills/earnings-calendar/assets/earnings_report_template.md +102 -0
  36. package/.claude/skills/earnings-calendar/references/fmp_api_guide.md +590 -0
  37. package/.claude/skills/earnings-calendar/scripts/fetch_earnings_fmp.py +443 -0
  38. package/.claude/skills/earnings-calendar/scripts/generate_report.py +366 -0
  39. package/.claude/skills/economic-calendar-fetcher/SKILL.md +365 -0
  40. package/.claude/skills/economic-calendar-fetcher/references/fmp_api_documentation.md +345 -0
  41. package/.claude/skills/economic-calendar-fetcher/scripts/get_economic_calendar.py +267 -0
  42. package/.claude/skills/ftd-detector/SKILL.md +147 -0
  43. package/.claude/skills/ftd-detector/references/ftd_methodology.md +188 -0
  44. package/.claude/skills/ftd-detector/references/post_ftd_guide.md +185 -0
  45. package/.claude/skills/ftd-detector/scripts/fmp_client.py +158 -0
  46. package/.claude/skills/ftd-detector/scripts/ftd_detector.py +280 -0
  47. package/.claude/skills/ftd-detector/scripts/post_ftd_monitor.py +404 -0
  48. package/.claude/skills/ftd-detector/scripts/rally_tracker.py +508 -0
  49. package/.claude/skills/ftd-detector/scripts/report_generator.py +341 -0
  50. package/.claude/skills/ftd-detector/scripts/tests/conftest.py +9 -0
  51. package/.claude/skills/ftd-detector/scripts/tests/helpers.py +107 -0
  52. package/.claude/skills/ftd-detector/scripts/tests/test_post_ftd_monitor.py +311 -0
  53. package/.claude/skills/ftd-detector/scripts/tests/test_rally_tracker.py +302 -0
  54. package/.claude/skills/institutional-flow-tracker/README.md +362 -0
  55. package/.claude/skills/institutional-flow-tracker/SKILL.md +357 -0
  56. package/.claude/skills/institutional-flow-tracker/references/13f_filings_guide.md +383 -0
  57. package/.claude/skills/institutional-flow-tracker/references/institutional_investor_types.md +580 -0
  58. package/.claude/skills/institutional-flow-tracker/references/interpretation_framework.md +573 -0
  59. package/.claude/skills/institutional-flow-tracker/scripts/analyze_single_stock.py +457 -0
  60. package/.claude/skills/institutional-flow-tracker/scripts/track_institution_portfolio.py +108 -0
  61. package/.claude/skills/institutional-flow-tracker/scripts/track_institutional_flow.py +450 -0
  62. package/.claude/skills/macro-regime-detector/SKILL.md +86 -0
  63. package/.claude/skills/macro-regime-detector/references/historical_regimes.md +124 -0
  64. package/.claude/skills/macro-regime-detector/references/indicator_interpretation_guide.md +144 -0
  65. package/.claude/skills/macro-regime-detector/references/regime_detection_methodology.md +138 -0
  66. package/.claude/skills/macro-regime-detector/scripts/calculators/__init__.py +1 -0
  67. package/.claude/skills/macro-regime-detector/scripts/calculators/concentration_calculator.py +165 -0
  68. package/.claude/skills/macro-regime-detector/scripts/calculators/credit_conditions_calculator.py +124 -0
  69. package/.claude/skills/macro-regime-detector/scripts/calculators/equity_bond_calculator.py +198 -0
  70. package/.claude/skills/macro-regime-detector/scripts/calculators/sector_rotation_calculator.py +123 -0
  71. package/.claude/skills/macro-regime-detector/scripts/calculators/size_factor_calculator.py +131 -0
  72. package/.claude/skills/macro-regime-detector/scripts/calculators/utils.py +347 -0
  73. package/.claude/skills/macro-regime-detector/scripts/calculators/yield_curve_calculator.py +279 -0
  74. package/.claude/skills/macro-regime-detector/scripts/fmp_client.py +134 -0
  75. package/.claude/skills/macro-regime-detector/scripts/macro_regime_detector.py +278 -0
  76. package/.claude/skills/macro-regime-detector/scripts/report_generator.py +327 -0
  77. package/.claude/skills/macro-regime-detector/scripts/scorer.py +574 -0
  78. package/.claude/skills/macro-regime-detector/scripts/tests/conftest.py +9 -0
  79. package/.claude/skills/macro-regime-detector/scripts/tests/test_concentration.py +78 -0
  80. package/.claude/skills/macro-regime-detector/scripts/tests/test_credit_conditions.py +59 -0
  81. package/.claude/skills/macro-regime-detector/scripts/tests/test_equity_bond.py +74 -0
  82. package/.claude/skills/macro-regime-detector/scripts/tests/test_helpers.py +90 -0
  83. package/.claude/skills/macro-regime-detector/scripts/tests/test_scorer.py +439 -0
  84. package/.claude/skills/macro-regime-detector/scripts/tests/test_sector_rotation.py +78 -0
  85. package/.claude/skills/macro-regime-detector/scripts/tests/test_size_factor.py +59 -0
  86. package/.claude/skills/macro-regime-detector/scripts/tests/test_utils.py +126 -0
  87. package/.claude/skills/macro-regime-detector/scripts/tests/test_yield_curve.py +64 -0
  88. package/.claude/skills/market-breadth-analyzer/SKILL.md +121 -0
  89. package/.claude/skills/market-breadth-analyzer/references/breadth_analysis_methodology.md +168 -0
  90. package/.claude/skills/market-breadth-analyzer/scripts/calculators/__init__.py +1 -0
  91. package/.claude/skills/market-breadth-analyzer/scripts/calculators/bearish_signal_calculator.py +150 -0
  92. package/.claude/skills/market-breadth-analyzer/scripts/calculators/cycle_calculator.py +168 -0
  93. package/.claude/skills/market-breadth-analyzer/scripts/calculators/divergence_calculator.py +119 -0
  94. package/.claude/skills/market-breadth-analyzer/scripts/calculators/historical_context_calculator.py +120 -0
  95. package/.claude/skills/market-breadth-analyzer/scripts/calculators/ma_crossover_calculator.py +115 -0
  96. package/.claude/skills/market-breadth-analyzer/scripts/calculators/trend_level_calculator.py +103 -0
  97. package/.claude/skills/market-breadth-analyzer/scripts/csv_client.py +225 -0
  98. package/.claude/skills/market-breadth-analyzer/scripts/market_breadth_analyzer.py +307 -0
  99. package/.claude/skills/market-breadth-analyzer/scripts/report_generator.py +330 -0
  100. package/.claude/skills/market-breadth-analyzer/scripts/scorer.py +271 -0
  101. package/.claude/skills/market-environment-analysis/SKILL.md +139 -0
  102. package/.claude/skills/market-environment-analysis/references/analysis_patterns.md +124 -0
  103. package/.claude/skills/market-environment-analysis/references/indicators.md +99 -0
  104. package/.claude/skills/market-environment-analysis/scripts/market_utils.py +127 -0
  105. package/.claude/skills/market-news-analyst/SKILL.md +714 -0
  106. package/.claude/skills/market-news-analyst/references/corporate_news_impact.md +446 -0
  107. package/.claude/skills/market-news-analyst/references/geopolitical_commodity_correlations.md +499 -0
  108. package/.claude/skills/market-news-analyst/references/market_event_patterns.md +393 -0
  109. package/.claude/skills/market-news-analyst/references/trusted_news_sources.md +510 -0
  110. package/.claude/skills/market-top-detector/SKILL.md +159 -0
  111. package/.claude/skills/market-top-detector/references/distribution_day_guide.md +100 -0
  112. package/.claude/skills/market-top-detector/references/historical_tops.md +142 -0
  113. package/.claude/skills/market-top-detector/references/market_top_methodology.md +167 -0
  114. package/.claude/skills/market-top-detector/scripts/calculators/__init__.py +17 -0
  115. package/.claude/skills/market-top-detector/scripts/calculators/breadth_calculator.py +116 -0
  116. package/.claude/skills/market-top-detector/scripts/calculators/defensive_rotation_calculator.py +127 -0
  117. package/.claude/skills/market-top-detector/scripts/calculators/distribution_day_calculator.py +161 -0
  118. package/.claude/skills/market-top-detector/scripts/calculators/index_technical_calculator.py +254 -0
  119. package/.claude/skills/market-top-detector/scripts/calculators/leading_stock_calculator.py +198 -0
  120. package/.claude/skills/market-top-detector/scripts/calculators/sentiment_calculator.py +213 -0
  121. package/.claude/skills/market-top-detector/scripts/fmp_client.py +158 -0
  122. package/.claude/skills/market-top-detector/scripts/market_top_detector.py +349 -0
  123. package/.claude/skills/market-top-detector/scripts/report_generator.py +314 -0
  124. package/.claude/skills/market-top-detector/scripts/scorer.py +473 -0
  125. package/.claude/skills/market-top-detector/scripts/tests/conftest.py +9 -0
  126. package/.claude/skills/market-top-detector/scripts/tests/helpers.py +49 -0
  127. package/.claude/skills/market-top-detector/scripts/tests/test_breadth.py +62 -0
  128. package/.claude/skills/market-top-detector/scripts/tests/test_defensive_rotation.py +56 -0
  129. package/.claude/skills/market-top-detector/scripts/tests/test_distribution_day.py +92 -0
  130. package/.claude/skills/market-top-detector/scripts/tests/test_index_technical.py +73 -0
  131. package/.claude/skills/market-top-detector/scripts/tests/test_leading_stock.py +57 -0
  132. package/.claude/skills/market-top-detector/scripts/tests/test_scorer.py +180 -0
  133. package/.claude/skills/market-top-detector/scripts/tests/test_sentiment.py +64 -0
  134. package/.claude/skills/options-strategy-advisor/README.md +469 -0
  135. package/.claude/skills/options-strategy-advisor/SKILL.md +959 -0
  136. package/.claude/skills/options-strategy-advisor/scripts/black_scholes.py +495 -0
  137. package/.claude/skills/pair-trade-screener/README.md +389 -0
  138. package/.claude/skills/pair-trade-screener/SKILL.md +622 -0
  139. package/.claude/skills/pair-trade-screener/references/cointegration_guide.md +745 -0
  140. package/.claude/skills/pair-trade-screener/references/methodology.md +853 -0
  141. package/.claude/skills/pair-trade-screener/scripts/analyze_spread.py +394 -0
  142. package/.claude/skills/pair-trade-screener/scripts/find_pairs.py +535 -0
  143. package/.claude/skills/portfolio-manager/README.md +394 -0
  144. package/.claude/skills/portfolio-manager/SKILL.md +750 -0
  145. package/.claude/skills/portfolio-manager/references/alpaca-mcp-setup.md +367 -0
  146. package/.claude/skills/portfolio-manager/references/asset-allocation.md +502 -0
  147. package/.claude/skills/portfolio-manager/references/diversification-principles.md +553 -0
  148. package/.claude/skills/portfolio-manager/references/portfolio-risk-metrics.md +603 -0
  149. package/.claude/skills/portfolio-manager/references/position-evaluation.md +477 -0
  150. package/.claude/skills/portfolio-manager/references/rebalancing-strategies.md +715 -0
  151. package/.claude/skills/portfolio-manager/references/risk-profile-questionnaire.md +608 -0
  152. package/.claude/skills/portfolio-manager/references/target-allocations.md +558 -0
  153. package/.claude/skills/portfolio-manager/scripts/test_alpaca_connection.py +286 -0
  154. package/.claude/skills/scenario-analyzer/SKILL.md +317 -0
  155. package/.claude/skills/scenario-analyzer/references/headline_event_patterns.md +264 -0
  156. package/.claude/skills/scenario-analyzer/references/scenario_playbooks.md +320 -0
  157. package/.claude/skills/scenario-analyzer/references/sector_sensitivity_matrix.md +217 -0
  158. package/.claude/skills/sector-analyst/SKILL.md +206 -0
  159. package/.claude/skills/sector-analyst/assets/industory_performance_1.jpeg +0 -0
  160. package/.claude/skills/sector-analyst/assets/industory_performance_2.jpeg +0 -0
  161. package/.claude/skills/sector-analyst/assets/sector_performance.jpeg +0 -0
  162. package/.claude/skills/sector-analyst/references/sector_rotation.md +170 -0
  163. package/.claude/skills/stanley-druckenmiller-investment/SKILL.md +84 -0
  164. package/.claude/skills/stanley-druckenmiller-investment/references/case-studies.md +148 -0
  165. package/.claude/skills/stanley-druckenmiller-investment/references/investment-philosophy.md +80 -0
  166. package/.claude/skills/stanley-druckenmiller-investment/references/market-analysis-guide.md +146 -0
  167. package/.claude/skills/stock/NOTION_SETUP.md +33 -0
  168. package/.claude/skills/stock/SKILL.md +38 -0
  169. package/.claude/skills/technical-analyst/SKILL.md +238 -0
  170. package/.claude/skills/technical-analyst/assets/analysis_template.md +183 -0
  171. package/.claude/skills/technical-analyst/references/technical_analysis_framework.md +282 -0
  172. package/.claude/skills/theme-detector/SKILL.md +320 -0
  173. package/.claude/skills/theme-detector/assets/report_template.md +155 -0
  174. package/.claude/skills/theme-detector/references/cross_sector_themes.md +252 -0
  175. package/.claude/skills/theme-detector/references/finviz_industry_codes.md +403 -0
  176. package/.claude/skills/theme-detector/references/thematic_etf_catalog.md +333 -0
  177. package/.claude/skills/theme-detector/references/theme_detection_methodology.md +430 -0
  178. package/.claude/skills/theme-detector/scripts/calculators/__init__.py +1 -0
  179. package/.claude/skills/theme-detector/scripts/calculators/heat_calculator.py +123 -0
  180. package/.claude/skills/theme-detector/scripts/calculators/industry_ranker.py +98 -0
  181. package/.claude/skills/theme-detector/scripts/calculators/lifecycle_calculator.py +172 -0
  182. package/.claude/skills/theme-detector/scripts/calculators/theme_classifier.py +195 -0
  183. package/.claude/skills/theme-detector/scripts/calculators/theme_discoverer.py +280 -0
  184. package/.claude/skills/theme-detector/scripts/config_loader.py +142 -0
  185. package/.claude/skills/theme-detector/scripts/default_theme_config.py +254 -0
  186. package/.claude/skills/theme-detector/scripts/etf_scanner.py +609 -0
  187. package/.claude/skills/theme-detector/scripts/finviz_performance_client.py +131 -0
  188. package/.claude/skills/theme-detector/scripts/report_generator.py +490 -0
  189. package/.claude/skills/theme-detector/scripts/representative_stock_selector.py +673 -0
  190. package/.claude/skills/theme-detector/scripts/scorer.py +87 -0
  191. package/.claude/skills/theme-detector/scripts/tests/README.md +21 -0
  192. package/.claude/skills/theme-detector/scripts/tests/conftest.py +9 -0
  193. package/.claude/skills/theme-detector/scripts/tests/test_config_loader.py +239 -0
  194. package/.claude/skills/theme-detector/scripts/tests/test_etf_scanner.py +810 -0
  195. package/.claude/skills/theme-detector/scripts/tests/test_heat_calculator.py +245 -0
  196. package/.claude/skills/theme-detector/scripts/tests/test_industry_ranker.py +256 -0
  197. package/.claude/skills/theme-detector/scripts/tests/test_lifecycle_calculator.py +301 -0
  198. package/.claude/skills/theme-detector/scripts/tests/test_report_generator.py +624 -0
  199. package/.claude/skills/theme-detector/scripts/tests/test_representative_stock_selector.py +898 -0
  200. package/.claude/skills/theme-detector/scripts/tests/test_scorer.py +185 -0
  201. package/.claude/skills/theme-detector/scripts/tests/test_theme_classifier.py +534 -0
  202. package/.claude/skills/theme-detector/scripts/tests/test_theme_detector_e2e.py +467 -0
  203. package/.claude/skills/theme-detector/scripts/tests/test_theme_discoverer.py +458 -0
  204. package/.claude/skills/theme-detector/scripts/tests/test_uptrend_client.py +76 -0
  205. package/.claude/skills/theme-detector/scripts/theme_detector.py +815 -0
  206. package/.claude/skills/theme-detector/scripts/themes.yaml +168 -0
  207. package/.claude/skills/theme-detector/scripts/uptrend_client.py +241 -0
  208. package/.claude/skills/uptrend-analyzer/SKILL.md +108 -0
  209. package/.claude/skills/uptrend-analyzer/references/uptrend_methodology.md +215 -0
  210. package/.claude/skills/uptrend-analyzer/scripts/calculators/__init__.py +1 -0
  211. package/.claude/skills/uptrend-analyzer/scripts/calculators/historical_context_calculator.py +122 -0
  212. package/.claude/skills/uptrend-analyzer/scripts/calculators/market_breadth_calculator.py +145 -0
  213. package/.claude/skills/uptrend-analyzer/scripts/calculators/momentum_calculator.py +183 -0
  214. package/.claude/skills/uptrend-analyzer/scripts/calculators/sector_participation_calculator.py +204 -0
  215. package/.claude/skills/uptrend-analyzer/scripts/calculators/sector_rotation_calculator.py +218 -0
  216. package/.claude/skills/uptrend-analyzer/scripts/data_fetcher.py +236 -0
  217. package/.claude/skills/uptrend-analyzer/scripts/report_generator.py +329 -0
  218. package/.claude/skills/uptrend-analyzer/scripts/scorer.py +276 -0
  219. package/.claude/skills/uptrend-analyzer/scripts/uptrend_analyzer.py +219 -0
  220. package/.claude/skills/us-market-bubble-detector/CHANGELOG.md +118 -0
  221. package/.claude/skills/us-market-bubble-detector/SKILL.md +545 -0
  222. package/.claude/skills/us-market-bubble-detector/references/bubble_framework.md +335 -0
  223. package/.claude/skills/us-market-bubble-detector/references/historical_cases.md +327 -0
  224. package/.claude/skills/us-market-bubble-detector/references/implementation_guide.md +473 -0
  225. package/.claude/skills/us-market-bubble-detector/references/quick_reference.md +354 -0
  226. package/.claude/skills/us-market-bubble-detector/references/quick_reference_en.md +342 -0
  227. package/.claude/skills/us-market-bubble-detector/scripts/bubble_scorer.py +309 -0
  228. package/.claude/skills/us-stock-analysis/SKILL.md +294 -0
  229. package/.claude/skills/us-stock-analysis/references/financial-metrics.md +172 -0
  230. package/.claude/skills/us-stock-analysis/references/fundamental-analysis.md +129 -0
  231. package/.claude/skills/us-stock-analysis/references/report-template.md +207 -0
  232. package/.claude/skills/us-stock-analysis/references/technical-analysis.md +93 -0
  233. package/.claude/skills/value-dividend-screener/SKILL.md +562 -0
  234. package/.claude/skills/value-dividend-screener/references/fmp_api_guide.md +348 -0
  235. package/.claude/skills/value-dividend-screener/references/screening_methodology.md +315 -0
  236. package/.claude/skills/value-dividend-screener/scripts/screen_dividend_stocks.py +1138 -0
  237. package/.claude/skills/vcp-screener/SKILL.md +79 -0
  238. package/.claude/skills/vcp-screener/references/fmp_api_endpoints.md +45 -0
  239. package/.claude/skills/vcp-screener/references/scoring_system.md +154 -0
  240. package/.claude/skills/vcp-screener/references/vcp_methodology.md +124 -0
  241. package/.claude/skills/vcp-screener/scripts/calculators/__init__.py +1 -0
  242. package/.claude/skills/vcp-screener/scripts/calculators/pivot_proximity_calculator.py +139 -0
  243. package/.claude/skills/vcp-screener/scripts/calculators/relative_strength_calculator.py +161 -0
  244. package/.claude/skills/vcp-screener/scripts/calculators/trend_template_calculator.py +228 -0
  245. package/.claude/skills/vcp-screener/scripts/calculators/vcp_pattern_calculator.py +322 -0
  246. package/.claude/skills/vcp-screener/scripts/calculators/volume_pattern_calculator.py +121 -0
  247. package/.claude/skills/vcp-screener/scripts/fmp_client.py +162 -0
  248. package/.claude/skills/vcp-screener/scripts/report_generator.py +317 -0
  249. package/.claude/skills/vcp-screener/scripts/scorer.py +155 -0
  250. package/.claude/skills/vcp-screener/scripts/screen_vcp.py +536 -0
  251. package/.claude/skills/vcp-screener/scripts/tests/__init__.py +0 -0
  252. package/.claude/skills/vcp-screener/scripts/tests/conftest.py +9 -0
  253. package/.claude/skills/vcp-screener/scripts/tests/test_vcp_screener.py +834 -0
  254. package/.claude/skills/weekly-trade-strategy/.claude/agents/druckenmiller-strategy-planner.md +300 -0
  255. package/.claude/skills/weekly-trade-strategy/.claude/agents/market-news-analyzer.md +239 -0
  256. package/.claude/skills/weekly-trade-strategy/.claude/agents/technical-market-analyst.md +187 -0
  257. package/.claude/skills/weekly-trade-strategy/.claude/agents/us-market-analyst.md +218 -0
  258. package/.claude/skills/weekly-trade-strategy/.claude/agents/weekly-trade-blog-writer.md +318 -0
  259. package/.claude/skills/weekly-trade-strategy/.claude/skills/breadth-chart-analyst/SKILL.md +662 -0
  260. package/.claude/skills/weekly-trade-strategy/.claude/skills/breadth-chart-analyst/assets/SP500_Breadth_Index_200MA_8MA.jpeg +0 -0
  261. package/.claude/skills/weekly-trade-strategy/.claude/skills/breadth-chart-analyst/assets/US_Stock_Market_Uptrend_Ratio.jpeg +0 -0
  262. package/.claude/skills/weekly-trade-strategy/.claude/skills/breadth-chart-analyst/assets/breadth_analysis_template.md +558 -0
  263. package/.claude/skills/weekly-trade-strategy/.claude/skills/breadth-chart-analyst/references/breadth_chart_methodology.md +590 -0
  264. package/.claude/skills/weekly-trade-strategy/.claude/skills/earnings-calendar/SKILL.md +721 -0
  265. package/.claude/skills/weekly-trade-strategy/.claude/skills/earnings-calendar/assets/earnings_report_template.md +102 -0
  266. package/.claude/skills/weekly-trade-strategy/.claude/skills/earnings-calendar/earnings_calendar_2025-11-02.md +447 -0
  267. package/.claude/skills/weekly-trade-strategy/.claude/skills/earnings-calendar/references/fmp_api_guide.md +590 -0
  268. package/.claude/skills/weekly-trade-strategy/.claude/skills/earnings-calendar/scripts/fetch_earnings_fmp.py +443 -0
  269. package/.claude/skills/weekly-trade-strategy/.claude/skills/earnings-calendar/scripts/generate_report.py +366 -0
  270. package/.claude/skills/weekly-trade-strategy/.claude/skills/economic-calendar-fetcher/SKILL.md +365 -0
  271. package/.claude/skills/weekly-trade-strategy/.claude/skills/economic-calendar-fetcher/references/fmp_api_documentation.md +345 -0
  272. package/.claude/skills/weekly-trade-strategy/.claude/skills/economic-calendar-fetcher/scripts/get_economic_calendar.py +267 -0
  273. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-environment-analysis/SKILL.md +139 -0
  274. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-environment-analysis/references/analysis_patterns.md +124 -0
  275. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-environment-analysis/references/indicators.md +99 -0
  276. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-environment-analysis/scripts/market_utils.py +127 -0
  277. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-news-analyst/SKILL.md +714 -0
  278. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-news-analyst/references/corporate_news_impact.md +446 -0
  279. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-news-analyst/references/geopolitical_commodity_correlations.md +499 -0
  280. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-news-analyst/references/market_event_patterns.md +393 -0
  281. package/.claude/skills/weekly-trade-strategy/.claude/skills/market-news-analyst/references/trusted_news_sources.md +510 -0
  282. package/.claude/skills/weekly-trade-strategy/.claude/skills/sector-analyst/SKILL.md +206 -0
  283. package/.claude/skills/weekly-trade-strategy/.claude/skills/sector-analyst/assets/industory_performance_1.jpeg +0 -0
  284. package/.claude/skills/weekly-trade-strategy/.claude/skills/sector-analyst/assets/industory_performance_2.jpeg +0 -0
  285. package/.claude/skills/weekly-trade-strategy/.claude/skills/sector-analyst/assets/sector_performance.jpeg +0 -0
  286. package/.claude/skills/weekly-trade-strategy/.claude/skills/sector-analyst/references/sector_rotation.md +170 -0
  287. package/.claude/skills/weekly-trade-strategy/.claude/skills/stanley-druckenmiller-investment/SKILL.md +84 -0
  288. package/.claude/skills/weekly-trade-strategy/.claude/skills/stanley-druckenmiller-investment/references/case-studies.md +148 -0
  289. package/.claude/skills/weekly-trade-strategy/.claude/skills/stanley-druckenmiller-investment/references/investment-philosophy.md +80 -0
  290. package/.claude/skills/weekly-trade-strategy/.claude/skills/stanley-druckenmiller-investment/references/market-analysis-guide.md +146 -0
  291. package/.claude/skills/weekly-trade-strategy/.claude/skills/technical-analyst/SKILL.md +238 -0
  292. package/.claude/skills/weekly-trade-strategy/.claude/skills/technical-analyst/assets/analysis_template.md +183 -0
  293. package/.claude/skills/weekly-trade-strategy/.claude/skills/technical-analyst/references/technical_analysis_framework.md +282 -0
  294. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/CHANGELOG.md +118 -0
  295. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/SKILL.md +545 -0
  296. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/references/bubble_framework.md +335 -0
  297. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/references/historical_cases.md +327 -0
  298. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/references/implementation_guide.md +473 -0
  299. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/references/quick_reference.md +354 -0
  300. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/references/quick_reference_en.md +342 -0
  301. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-market-bubble-detector/scripts/bubble_scorer.py +309 -0
  302. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-stock-analysis/SKILL.md +294 -0
  303. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-stock-analysis/references/financial-metrics.md +172 -0
  304. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-stock-analysis/references/fundamental-analysis.md +129 -0
  305. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-stock-analysis/references/report-template.md +207 -0
  306. package/.claude/skills/weekly-trade-strategy/.claude/skills/us-stock-analysis/references/technical-analysis.md +93 -0
  307. package/.claude/skills/weekly-trade-strategy/CLAUDE.md +454 -0
  308. package/.claude/skills/weekly-trade-strategy/README.md +287 -0
  309. package/.claude/skills/weekly-trade-strategy/blogs/.gitkeep +0 -0
  310. package/.claude/skills/weekly-trade-strategy/charts/.gitkeep +0 -0
  311. package/.claude/skills/weekly-trade-strategy/earnings_data.json +10054 -0
  312. package/.claude/skills/weekly-trade-strategy/skills/breadth-chart-analyst/SKILL.md +662 -0
  313. package/.claude/skills/weekly-trade-strategy/skills/breadth-chart-analyst/assets/SP500_Breadth_Index_200MA_8MA.jpeg +0 -0
  314. package/.claude/skills/weekly-trade-strategy/skills/breadth-chart-analyst/assets/US_Stock_Market_Uptrend_Ratio.jpeg +0 -0
  315. package/.claude/skills/weekly-trade-strategy/skills/breadth-chart-analyst/assets/breadth_analysis_template.md +558 -0
  316. package/.claude/skills/weekly-trade-strategy/skills/breadth-chart-analyst/references/breadth_chart_methodology.md +590 -0
  317. package/.claude/skills/weekly-trade-strategy/skills/earnings-calendar/SKILL.md +721 -0
  318. package/.claude/skills/weekly-trade-strategy/skills/earnings-calendar/assets/earnings_report_template.md +102 -0
  319. package/.claude/skills/weekly-trade-strategy/skills/earnings-calendar/earnings_calendar_2025-11-02.md +447 -0
  320. package/.claude/skills/weekly-trade-strategy/skills/earnings-calendar/references/fmp_api_guide.md +590 -0
  321. package/.claude/skills/weekly-trade-strategy/skills/earnings-calendar/scripts/fetch_earnings_fmp.py +443 -0
  322. package/.claude/skills/weekly-trade-strategy/skills/earnings-calendar/scripts/generate_report.py +366 -0
  323. package/.claude/skills/weekly-trade-strategy/skills/economic-calendar-fetcher/SKILL.md +365 -0
  324. package/.claude/skills/weekly-trade-strategy/skills/economic-calendar-fetcher/references/fmp_api_documentation.md +345 -0
  325. package/.claude/skills/weekly-trade-strategy/skills/economic-calendar-fetcher/scripts/get_economic_calendar.py +267 -0
  326. package/.claude/skills/weekly-trade-strategy/skills/market-environment-analysis/SKILL.md +139 -0
  327. package/.claude/skills/weekly-trade-strategy/skills/market-environment-analysis/references/analysis_patterns.md +124 -0
  328. package/.claude/skills/weekly-trade-strategy/skills/market-environment-analysis/references/indicators.md +99 -0
  329. package/.claude/skills/weekly-trade-strategy/skills/market-environment-analysis/scripts/market_utils.py +127 -0
  330. package/.claude/skills/weekly-trade-strategy/skills/market-news-analyst/SKILL.md +714 -0
  331. package/.claude/skills/weekly-trade-strategy/skills/market-news-analyst/references/corporate_news_impact.md +446 -0
  332. package/.claude/skills/weekly-trade-strategy/skills/market-news-analyst/references/geopolitical_commodity_correlations.md +499 -0
  333. package/.claude/skills/weekly-trade-strategy/skills/market-news-analyst/references/market_event_patterns.md +393 -0
  334. package/.claude/skills/weekly-trade-strategy/skills/market-news-analyst/references/trusted_news_sources.md +510 -0
  335. package/.claude/skills/weekly-trade-strategy/skills/sector-analyst/SKILL.md +206 -0
  336. package/.claude/skills/weekly-trade-strategy/skills/sector-analyst/assets/industory_performance_1.jpeg +0 -0
  337. package/.claude/skills/weekly-trade-strategy/skills/sector-analyst/assets/industory_performance_2.jpeg +0 -0
  338. package/.claude/skills/weekly-trade-strategy/skills/sector-analyst/assets/sector_performance.jpeg +0 -0
  339. package/.claude/skills/weekly-trade-strategy/skills/sector-analyst/references/sector_rotation.md +170 -0
  340. package/.claude/skills/weekly-trade-strategy/skills/stanley-druckenmiller-investment/SKILL.md +84 -0
  341. package/.claude/skills/weekly-trade-strategy/skills/stanley-druckenmiller-investment/references/case-studies.md +148 -0
  342. package/.claude/skills/weekly-trade-strategy/skills/stanley-druckenmiller-investment/references/investment-philosophy.md +80 -0
  343. package/.claude/skills/weekly-trade-strategy/skills/stanley-druckenmiller-investment/references/market-analysis-guide.md +146 -0
  344. package/.claude/skills/weekly-trade-strategy/skills/technical-analyst/SKILL.md +238 -0
  345. package/.claude/skills/weekly-trade-strategy/skills/technical-analyst/assets/analysis_template.md +183 -0
  346. package/.claude/skills/weekly-trade-strategy/skills/technical-analyst/references/technical_analysis_framework.md +282 -0
  347. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/CHANGELOG.md +118 -0
  348. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/SKILL.md +545 -0
  349. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/references/bubble_framework.md +335 -0
  350. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/references/historical_cases.md +327 -0
  351. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/references/implementation_guide.md +473 -0
  352. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/references/quick_reference.md +354 -0
  353. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/references/quick_reference_en.md +342 -0
  354. package/.claude/skills/weekly-trade-strategy/skills/us-market-bubble-detector/scripts/bubble_scorer.py +309 -0
  355. package/.claude/skills/weekly-trade-strategy/skills/us-stock-analysis/SKILL.md +294 -0
  356. package/.claude/skills/weekly-trade-strategy/skills/us-stock-analysis/references/financial-metrics.md +172 -0
  357. package/.claude/skills/weekly-trade-strategy/skills/us-stock-analysis/references/fundamental-analysis.md +129 -0
  358. package/.claude/skills/weekly-trade-strategy/skills/us-stock-analysis/references/report-template.md +207 -0
  359. package/.claude/skills/weekly-trade-strategy/skills/us-stock-analysis/references/technical-analysis.md +93 -0
  360. package/.mcp.json +3 -0
  361. package/cli.mjs +16 -16
  362. package/package.json +4 -2
@@ -0,0 +1,750 @@
1
+ ---
2
+ name: portfolio-manager
3
+ description: Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diversification, and generate rebalancing recommendations. Use when user requests portfolio review, position analysis, risk assessment, performance evaluation, or rebalancing suggestions for their brokerage account.
4
+ ---
5
+
6
+ # Portfolio Manager
7
+
8
+ ## Overview
9
+
10
+ Analyze and manage investment portfolios by integrating with Alpaca MCP Server to fetch real-time holdings data, then performing comprehensive analysis covering asset allocation, diversification, risk metrics, individual position evaluation, and rebalancing recommendations. Generate detailed portfolio reports with actionable insights.
11
+
12
+ This skill leverages Alpaca's brokerage API through MCP (Model Context Protocol) to access live portfolio data, ensuring analysis is based on actual current positions rather than manually entered data.
13
+
14
+ ## When to Use
15
+
16
+ Invoke this skill when the user requests:
17
+ - "Analyze my portfolio"
18
+ - "Review my current positions"
19
+ - "What's my asset allocation?"
20
+ - "Check my portfolio risk"
21
+ - "Should I rebalance my portfolio?"
22
+ - "Evaluate my holdings"
23
+ - "Portfolio performance review"
24
+ - "What stocks should I buy or sell?"
25
+ - Any request involving portfolio-level analysis or management
26
+
27
+ ## Prerequisites
28
+
29
+ ### Alpaca MCP Server Setup
30
+
31
+ This skill requires Alpaca MCP Server to be configured and connected. The MCP server provides access to:
32
+ - Current portfolio positions
33
+ - Account equity and buying power
34
+ - Historical positions and transactions
35
+ - Market data for held securities
36
+
37
+ **MCP Server Tools Used:**
38
+ - `get_account_info` - Fetch account equity, buying power, cash balance
39
+ - `get_positions` - Retrieve all current positions with quantities, cost basis, market value
40
+ - `get_portfolio_history` - Historical portfolio performance data
41
+ - Market data tools for price quotes and fundamentals
42
+
43
+ If Alpaca MCP Server is not connected, inform the user and provide setup instructions from `references/alpaca_mcp_setup.md`.
44
+
45
+ ## Workflow
46
+
47
+ ### Step 1: Fetch Portfolio Data via Alpaca MCP
48
+
49
+ Use Alpaca MCP Server tools to gather current portfolio information:
50
+
51
+ **1.1 Get Account Information:**
52
+ ```
53
+ Use mcp__alpaca__get_account_info to fetch:
54
+ - Account equity (total portfolio value)
55
+ - Cash balance
56
+ - Buying power
57
+ - Account status
58
+ ```
59
+
60
+ **1.2 Get Current Positions:**
61
+ ```
62
+ Use mcp__alpaca__get_positions to fetch all holdings:
63
+ - Symbol ticker
64
+ - Quantity held
65
+ - Average entry price (cost basis)
66
+ - Current market price
67
+ - Current market value
68
+ - Unrealized P&L ($ and %)
69
+ - Position size as % of portfolio
70
+ ```
71
+
72
+ **1.3 Get Portfolio History (Optional):**
73
+ ```
74
+ Use mcp__alpaca__get_portfolio_history for performance analysis:
75
+ - Historical equity values
76
+ - Time-weighted return calculation
77
+ - Drawdown analysis
78
+ ```
79
+
80
+ **Data Validation:**
81
+ - Verify all positions have valid ticker symbols
82
+ - Confirm market values sum to approximate account equity
83
+ - Check for any stale or inactive positions
84
+ - Handle edge cases (fractional shares, options, crypto if supported)
85
+
86
+ ### Step 2: Enrich Position Data
87
+
88
+ For each position in the portfolio, gather additional market data and fundamentals:
89
+
90
+ **2.1 Current Market Data:**
91
+ - Real-time or delayed price quotes
92
+ - Daily volume and liquidity metrics
93
+ - 52-week range
94
+ - Market capitalization
95
+
96
+ **2.2 Fundamental Data:**
97
+ Use WebSearch or available market data APIs to fetch:
98
+ - Sector and industry classification
99
+ - Key valuation metrics (P/E, P/B, dividend yield)
100
+ - Recent earnings and financial health indicators
101
+ - Analyst ratings and price targets
102
+ - Recent news and material developments
103
+
104
+ **2.3 Technical Analysis:**
105
+ - Price trend (20-day, 50-day, 200-day moving averages)
106
+ - Relative strength
107
+ - Support and resistance levels
108
+ - Momentum indicators (RSI, MACD if available)
109
+
110
+ ### Step 3: Portfolio-Level Analysis
111
+
112
+ Perform comprehensive portfolio analysis using frameworks from reference files:
113
+
114
+ #### 3.1 Asset Allocation Analysis
115
+
116
+ **Read references/asset-allocation.md** for allocation frameworks
117
+
118
+ Analyze current allocation across multiple dimensions:
119
+
120
+ **By Asset Class:**
121
+ - Equities vs Fixed Income vs Cash vs Alternatives
122
+ - Compare to target allocation for user's risk profile
123
+ - Assess if allocation matches investment goals
124
+
125
+ **By Sector:**
126
+ - Technology, Healthcare, Financials, Consumer, etc.
127
+ - Identify sector concentration risks
128
+ - Compare to benchmark sector weights (e.g., S&P 500)
129
+
130
+ **By Market Cap:**
131
+ - Large-cap vs Mid-cap vs Small-cap distribution
132
+ - Concentration in mega-caps
133
+ - Market cap diversification score
134
+
135
+ **By Geography:**
136
+ - US vs International vs Emerging Markets
137
+ - Domestic concentration risk assessment
138
+
139
+ **Output Format:**
140
+ ```markdown
141
+ ## Asset Allocation
142
+
143
+ ### Current Allocation vs Target
144
+ | Asset Class | Current | Target | Variance |
145
+ |-------------|---------|--------|----------|
146
+ | US Equities | XX.X% | YY.Y% | +/- Z.Z% |
147
+ | ... |
148
+
149
+ ### Sector Breakdown
150
+ [Pie chart description or table with sector percentages]
151
+
152
+ ### Top 10 Holdings
153
+ | Rank | Symbol | % of Portfolio | Sector |
154
+ |------|--------|----------------|--------|
155
+ | 1 | AAPL | X.X% | Technology |
156
+ | ... |
157
+ ```
158
+
159
+ #### 3.2 Diversification Analysis
160
+
161
+ **Read references/diversification-principles.md** for diversification theory
162
+
163
+ Evaluate portfolio diversification quality:
164
+
165
+ **Position Concentration:**
166
+ - Identify top holdings and their aggregate weight
167
+ - Flag if any single position exceeds 10-15% of portfolio
168
+ - Calculate Herfindahl-Hirschman Index (HHI) for concentration measurement
169
+
170
+ **Sector Concentration:**
171
+ - Identify dominant sectors
172
+ - Flag if any sector exceeds 30-40% of portfolio
173
+ - Compare to benchmark sector diversity
174
+
175
+ **Correlation Analysis:**
176
+ - Estimate correlation between major positions
177
+ - Identify highly correlated holdings (potential redundancy)
178
+ - Assess true diversification benefit
179
+
180
+ **Number of Positions:**
181
+ - Optimal range: 15-30 stocks for individual portfolios
182
+ - Flag if under-diversified (<10 stocks) or over-diversified (>50 stocks)
183
+
184
+ **Output:**
185
+ ```markdown
186
+ ## Diversification Assessment
187
+
188
+ **Concentration Risk:** [Low / Medium / High]
189
+ - Top 5 holdings represent XX% of portfolio
190
+ - Largest single position: [SYMBOL] at XX%
191
+
192
+ **Sector Diversification:** [Excellent / Good / Fair / Poor]
193
+ - Dominant sector: [Sector Name] at XX%
194
+ - [Assessment of balance across sectors]
195
+
196
+ **Position Count:** [Optimal / Under-diversified / Over-diversified]
197
+ - Total positions: XX stocks
198
+ - [Recommendation]
199
+
200
+ **Correlation Concerns:**
201
+ - [List any highly correlated position pairs]
202
+ - [Diversification improvement suggestions]
203
+ ```
204
+
205
+ #### 3.3 Risk Analysis
206
+
207
+ **Read references/portfolio-risk-metrics.md** for risk measurement frameworks
208
+
209
+ Calculate and interpret key risk metrics:
210
+
211
+ **Volatility Measures:**
212
+ - Estimated portfolio beta (weighted average of position betas)
213
+ - Individual position volatilities
214
+ - Portfolio standard deviation (if historical data available)
215
+
216
+ **Downside Risk:**
217
+ - Maximum drawdown (from portfolio history)
218
+ - Current drawdown from peak
219
+ - Positions with significant unrealized losses
220
+
221
+ **Risk Concentration:**
222
+ - Percentage in high-volatility stocks (beta > 1.5)
223
+ - Percentage in speculative/unprofitable companies
224
+ - Leverage usage (if applicable)
225
+
226
+ **Tail Risk:**
227
+ - Exposure to potential black swan events
228
+ - Single-stock concentration risk
229
+ - Sector-specific event risk
230
+
231
+ **Output:**
232
+ ```markdown
233
+ ## Risk Assessment
234
+
235
+ **Overall Risk Profile:** [Conservative / Moderate / Aggressive]
236
+
237
+ **Portfolio Beta:** X.XX (vs market at 1.00)
238
+ - Interpretation: Portfolio is [more/less] volatile than market
239
+
240
+ **Maximum Drawdown:** -XX.X% (from $XXX,XXX to $XXX,XXX)
241
+ - Current drawdown from peak: -XX.X%
242
+
243
+ **High-Risk Positions:**
244
+ | Symbol | % of Portfolio | Beta | Risk Factor |
245
+ |--------|----------------|------|-------------|
246
+ | [TICKER] | XX% | X.XX | [High volatility / Recent loss / etc] |
247
+
248
+ **Risk Concentrations:**
249
+ - XX% in single sector ([Sector])
250
+ - XX% in stocks with beta > 1.5
251
+ - [Other concentration risks]
252
+
253
+ **Risk Score:** XX/100 ([Low/Medium/High] risk)
254
+ ```
255
+
256
+ #### 3.4 Performance Analysis
257
+
258
+ Evaluate portfolio performance using available data:
259
+
260
+ **Absolute Returns:**
261
+ - Overall portfolio unrealized P&L ($ and %)
262
+ - Best performing positions (top 5 by % gain)
263
+ - Worst performing positions (bottom 5 by % loss)
264
+
265
+ **Time-Weighted Returns (if history available):**
266
+ - YTD return
267
+ - 1-year, 3-year, 5-year annualized returns
268
+ - Compare to benchmark (S&P 500, relevant index)
269
+
270
+ **Position-Level Performance:**
271
+ - Winners vs Losers ratio
272
+ - Average gain on winning positions
273
+ - Average loss on losing positions
274
+ - Positions near 52-week highs/lows
275
+
276
+ **Output:**
277
+ ```markdown
278
+ ## Performance Review
279
+
280
+ **Total Portfolio Value:** $XXX,XXX
281
+ **Total Unrealized P&L:** $XX,XXX (+XX.X%)
282
+ **Cash Balance:** $XX,XXX (XX% of portfolio)
283
+
284
+ **Best Performers:**
285
+ | Symbol | Gain | Position Value |
286
+ |--------|------|----------------|
287
+ | [TICKER] | +XX.X% | $XX,XXX |
288
+ | ... |
289
+
290
+ **Worst Performers:**
291
+ | Symbol | Loss | Position Value |
292
+ |--------|------|----------------|
293
+ | [TICKER] | -XX.X% | $XX,XXX |
294
+ | ... |
295
+
296
+ **Performance vs Benchmark (if available):**
297
+ - Portfolio return: +X.X%
298
+ - S&P 500 return: +Y.Y%
299
+ - Alpha: +/- Z.Z%
300
+ ```
301
+
302
+ ### Step 4: Individual Position Analysis
303
+
304
+ For key positions (top 10-15 by portfolio weight), perform detailed analysis:
305
+
306
+ **Read references/position-evaluation.md** for position analysis framework
307
+
308
+ For each significant position:
309
+
310
+ **4.1 Current Thesis Validation:**
311
+ - Why was this position initiated? (if known from user context)
312
+ - Has the investment thesis played out or broken?
313
+ - Recent company developments and news
314
+
315
+ **4.2 Valuation Assessment:**
316
+ - Current valuation metrics (P/E, P/B, etc.)
317
+ - Compare to historical valuation range
318
+ - Compare to sector peers
319
+ - Overvalued / Fair / Undervalued assessment
320
+
321
+ **4.3 Technical Health:**
322
+ - Price trend (uptrend, downtrend, sideways)
323
+ - Position relative to moving averages
324
+ - Support and resistance levels
325
+ - Momentum status
326
+
327
+ **4.4 Position Sizing:**
328
+ - Current weight in portfolio
329
+ - Is size appropriate given conviction and risk?
330
+ - Overweight or underweight vs optimal
331
+
332
+ **4.5 Action Recommendation:**
333
+ - **HOLD** - Position is well-sized and thesis intact
334
+ - **ADD** - Underweight given opportunity, thesis strengthening
335
+ - **TRIM** - Overweight or valuation stretched
336
+ - **SELL** - Thesis broken, better opportunities elsewhere
337
+
338
+ **Output per position:**
339
+ ```markdown
340
+ ### [SYMBOL] - [Company Name] (XX.X% of portfolio)
341
+
342
+ **Position Details:**
343
+ - Shares: XXX
344
+ - Avg Cost: $XX.XX
345
+ - Current Price: $XX.XX
346
+ - Market Value: $XX,XXX
347
+ - Unrealized P/L: $X,XXX (+XX.X%)
348
+
349
+ **Fundamental Snapshot:**
350
+ - Sector: [Sector]
351
+ - Market Cap: $XX.XB
352
+ - P/E: XX.X | Dividend Yield: X.X%
353
+ - Recent developments: [Key news or earnings]
354
+
355
+ **Technical Status:**
356
+ - Trend: [Uptrend / Downtrend / Sideways]
357
+ - Price vs 50-day MA: [Above/Below by XX%]
358
+ - Support: $XX.XX | Resistance: $XX.XX
359
+
360
+ **Position Assessment:**
361
+ - **Thesis Status:** [Intact / Weakening / Broken / Strengthening]
362
+ - **Valuation:** [Undervalued / Fair / Overvalued]
363
+ - **Position Sizing:** [Optimal / Overweight / Underweight]
364
+
365
+ **Recommendation:** [HOLD / ADD / TRIM / SELL]
366
+ **Rationale:** [1-2 sentence explanation]
367
+ ```
368
+
369
+ ### Step 5: Rebalancing Recommendations
370
+
371
+ **Read references/rebalancing-strategies.md** for rebalancing approaches
372
+
373
+ Generate specific rebalancing recommendations:
374
+
375
+ **5.1 Identify Rebalancing Triggers:**
376
+ - Positions that have drifted significantly from target weights
377
+ - Sector/asset class allocations requiring adjustment
378
+ - Overweight positions to trim (exceeded threshold)
379
+ - Underweight areas to add (below threshold)
380
+ - Tax considerations (capital gains implications)
381
+
382
+ **5.2 Develop Rebalancing Plan:**
383
+
384
+ **Positions to TRIM:**
385
+ - Overweight positions (>threshold deviation from target)
386
+ - Stocks that have run up significantly (valuation concerns)
387
+ - Concentrated positions exceeding 15-20% of portfolio
388
+ - Positions with broken thesis
389
+
390
+ **Positions to ADD:**
391
+ - Underweight sectors or asset classes
392
+ - High-conviction positions currently underweight
393
+ - New opportunities to improve diversification
394
+
395
+ **Cash Deployment:**
396
+ - If excess cash (>10% of portfolio), suggest deployment
397
+ - Prioritize based on opportunity and allocation gaps
398
+
399
+ **5.3 Prioritization:**
400
+ Rank rebalancing actions by priority:
401
+ 1. **Immediate** - Risk reduction (trim concentrated positions)
402
+ 2. **High Priority** - Major allocation drift (>10% from target)
403
+ 3. **Medium Priority** - Moderate drift (5-10% from target)
404
+ 4. **Low Priority** - Fine-tuning and opportunistic adjustments
405
+
406
+ **Output:**
407
+ ```markdown
408
+ ## Rebalancing Recommendations
409
+
410
+ ### Summary
411
+ - **Rebalancing Needed:** [Yes / No / Optional]
412
+ - **Primary Reason:** [Concentration risk / Sector drift / Cash deployment / etc]
413
+ - **Estimated Trades:** X sell orders, Y buy orders
414
+
415
+ ### Recommended Actions
416
+
417
+ #### HIGH PRIORITY: Risk Reduction
418
+ **TRIM [SYMBOL]** from XX% to YY% of portfolio
419
+ - **Shares to Sell:** XX shares (~$XX,XXX)
420
+ - **Rationale:** [Overweight / Valuation extended / etc]
421
+ - **Tax Impact:** $X,XXX capital gain (est)
422
+
423
+ #### MEDIUM PRIORITY: Asset Allocation
424
+ **ADD [Sector/Asset Class]** exposure
425
+ - **Target:** Increase from XX% to YY%
426
+ - **Suggested Stocks:** [SYMBOL1, SYMBOL2, SYMBOL3]
427
+ - **Amount to Invest:** ~$XX,XXX
428
+
429
+ #### CASH DEPLOYMENT
430
+ **Current Cash:** $XX,XXX (XX% of portfolio)
431
+ - **Recommendation:** [Deploy / Keep for opportunities / Reduce to X%]
432
+ - **Suggested Allocation:** [Distribution across sectors/stocks]
433
+
434
+ ### Implementation Plan
435
+ 1. [First action - highest priority]
436
+ 2. [Second action]
437
+ 3. [Third action]
438
+ ...
439
+
440
+ **Timing Considerations:**
441
+ - [Tax year-end planning / Earnings season / Market conditions]
442
+ - [Suggested phasing if applicable]
443
+ ```
444
+
445
+ ### Step 6: Generate Portfolio Report
446
+
447
+ Create comprehensive markdown report saved to repository root:
448
+
449
+ **Filename:** `portfolio_analysis_YYYY-MM-DD.md`
450
+
451
+ **Report Structure:**
452
+
453
+ ```markdown
454
+ # Portfolio Analysis Report
455
+
456
+ **Account:** [Account type if available]
457
+ **Report Date:** YYYY-MM-DD
458
+ **Portfolio Value:** $XXX,XXX
459
+ **Total P&L:** $XX,XXX (+XX.X%)
460
+
461
+ ---
462
+
463
+ ## Executive Summary
464
+
465
+ [3-5 bullet points summarizing key findings]
466
+ - Overall portfolio health assessment
467
+ - Major strengths
468
+ - Key risks or concerns
469
+ - Primary recommendations
470
+
471
+ ---
472
+
473
+ ## Holdings Overview
474
+
475
+ [Summary table of all positions]
476
+
477
+ ---
478
+
479
+ ## Asset Allocation
480
+ [Section from Step 3.1]
481
+
482
+ ---
483
+
484
+ ## Diversification Analysis
485
+ [Section from Step 3.2]
486
+
487
+ ---
488
+
489
+ ## Risk Assessment
490
+ [Section from Step 3.3]
491
+
492
+ ---
493
+
494
+ ## Performance Review
495
+ [Section from Step 3.4]
496
+
497
+ ---
498
+
499
+ ## Position Analysis
500
+ [Detailed analysis of top 10-15 positions from Step 4]
501
+
502
+ ---
503
+
504
+ ## Rebalancing Recommendations
505
+ [Section from Step 5]
506
+
507
+ ---
508
+
509
+ ## Action Items
510
+
511
+ **Immediate Actions:**
512
+ - [ ] [Action 1]
513
+ - [ ] [Action 2]
514
+
515
+ **Medium-Term Actions:**
516
+ - [ ] [Action 3]
517
+ - [ ] [Action 4]
518
+
519
+ **Monitoring Priorities:**
520
+ - [ ] [Watch list item 1]
521
+ - [ ] [Watch list item 2]
522
+
523
+ ---
524
+
525
+ ## Appendix: Full Holdings
526
+
527
+ [Complete table with all positions and metrics]
528
+ ```
529
+
530
+ ### Step 7: Interactive Follow-up
531
+
532
+ Be prepared to answer follow-up questions:
533
+
534
+ **Common Questions:**
535
+
536
+ **"Why should I sell [SYMBOL]?"**
537
+ - Explain specific concerns (valuation, thesis breakdown, concentration)
538
+ - Provide supporting data
539
+ - Offer alternative positions if applicable
540
+
541
+ **"What should I buy instead?"**
542
+ - Suggest specific stocks to improve allocation
543
+ - Explain how they address portfolio gaps
544
+ - Provide brief investment thesis
545
+
546
+ **"What's my biggest risk?"**
547
+ - Identify primary risk factor (concentration, sector exposure, volatility)
548
+ - Quantify the risk
549
+ - Suggest mitigation strategies
550
+
551
+ **"How does my portfolio compare to [benchmark]?"**
552
+ - Compare allocation, sector weights, risk metrics
553
+ - Highlight key differences
554
+ - Assess if differences are justified
555
+
556
+ **"Should I rebalance now or wait?"**
557
+ - Consider market conditions, tax implications, transaction costs
558
+ - Provide timing recommendation with rationale
559
+
560
+ **"Can you analyze [specific position] in more detail?"**
561
+ - Perform deep-dive analysis using us-stock-analysis skill if needed
562
+ - Integrate findings back into portfolio context
563
+
564
+ ## Analysis Frameworks
565
+
566
+ ### Target Allocation Templates
567
+
568
+ This skill includes reference allocation models for different investor profiles:
569
+
570
+ **Read references/target-allocations.md** for detailed models:
571
+
572
+ - **Conservative** (Capital preservation, income focus)
573
+ - **Moderate** (Balanced growth and income)
574
+ - **Growth** (Long-term capital appreciation)
575
+ - **Aggressive** (Maximum growth, high risk tolerance)
576
+
577
+ Each model includes:
578
+ - Asset class targets (Stocks/Bonds/Cash/Alternatives)
579
+ - Sector guidelines
580
+ - Market cap distribution
581
+ - Geographic allocation
582
+ - Position sizing rules
583
+
584
+ Use these as comparison benchmarks when user hasn't specified their allocation strategy.
585
+
586
+ ### Risk Profile Assessment
587
+
588
+ If user's target allocation is unknown, assess appropriate risk profile based on:
589
+ - Age (if mentioned)
590
+ - Investment timeline (if mentioned)
591
+ - Current allocation (reveals preferences)
592
+ - Position types (conservative vs speculative stocks)
593
+
594
+ **Read references/risk-profile-questionnaire.md** for assessment framework
595
+
596
+ ## Output Guidelines
597
+
598
+ **Tone and Style:**
599
+ - Objective and analytical
600
+ - Actionable recommendations with clear rationale
601
+ - Acknowledge uncertainty in market forecasts
602
+ - Balance optimism with risk awareness
603
+ - Quantify whenever possible
604
+
605
+ **Data Presentation:**
606
+ - Tables for comparisons and metrics
607
+ - Percentages for allocations and returns
608
+ - Dollar amounts for absolute values
609
+ - Consistent formatting throughout report
610
+
611
+ **Recommendation Clarity:**
612
+ - Explicit action verbs (TRIM, ADD, HOLD, SELL)
613
+ - Specific quantities (sell XX shares, add $X,XXX)
614
+ - Priority levels (Immediate, High, Medium, Low)
615
+ - Supporting rationale for each recommendation
616
+
617
+ **Visual Descriptions:**
618
+ - Describe allocation breakdowns as if creating pie charts
619
+ - Sector weights as bar chart equivalents
620
+ - Performance trends with directional indicators (↑ ↓ →)
621
+
622
+ ## Reference Files
623
+
624
+ Load these references as needed during analysis:
625
+
626
+ **references/alpaca-mcp-setup.md**
627
+ - When: User needs help setting up Alpaca MCP Server
628
+ - Contains: Installation instructions, API key configuration, MCP server connection steps, troubleshooting
629
+
630
+ **references/asset-allocation.md**
631
+ - When: Analyzing portfolio allocation or creating rebalancing plan
632
+ - Contains: Asset allocation theory, optimal allocation by risk profile, sector allocation guidelines, rebalancing triggers
633
+
634
+ **references/diversification-principles.md**
635
+ - When: Assessing portfolio diversification quality
636
+ - Contains: Modern portfolio theory basics, correlation concepts, optimal position count, concentration risk thresholds, diversification metrics
637
+
638
+ **references/portfolio-risk-metrics.md**
639
+ - When: Calculating risk scores or interpreting volatility
640
+ - Contains: Beta calculation, standard deviation, Sharpe ratio, maximum drawdown, Value at Risk (VaR), risk-adjusted return metrics
641
+
642
+ **references/position-evaluation.md**
643
+ - When: Analyzing individual holdings for buy/hold/sell decisions
644
+ - Contains: Position analysis framework, thesis validation checklist, position sizing guidelines, sell discipline criteria
645
+
646
+ **references/rebalancing-strategies.md**
647
+ - When: Developing rebalancing recommendations
648
+ - Contains: Rebalancing methodologies (calendar-based, threshold-based, tactical), tax optimization strategies, transaction cost considerations, implementation timing
649
+
650
+ **references/target-allocations.md**
651
+ - When: Need benchmark allocations for comparison
652
+ - Contains: Model portfolios for conservative/moderate/growth/aggressive investors, sector target ranges, market cap distributions
653
+
654
+ **references/risk-profile-questionnaire.md**
655
+ - When: User hasn't specified risk tolerance or target allocation
656
+ - Contains: Risk assessment questions, scoring methodology, risk profile classification
657
+
658
+ ## Error Handling
659
+
660
+ **If Alpaca MCP Server is not connected:**
661
+ 1. Inform user that Alpaca integration is required
662
+ 2. Provide setup instructions from references/alpaca-mcp-setup.md
663
+ 3. Offer alternative: manual data entry (less ideal, user provides CSV of positions)
664
+
665
+ **If API returns incomplete data:**
666
+ - Proceed with available data
667
+ - Note limitations in report
668
+ - Suggest manual verification for missing positions
669
+
670
+ **If position data seems stale:**
671
+ - Flag the issue
672
+ - Recommend refreshing connection or checking Alpaca status
673
+ - Proceed with analysis but caveat findings
674
+
675
+ **If user has no positions:**
676
+ - Acknowledge empty portfolio
677
+ - Offer portfolio construction guidance instead of analysis
678
+ - Suggest using value-dividend-screener or us-stock-analysis for stock ideas
679
+
680
+ ## Advanced Features
681
+
682
+ ### Tax-Loss Harvesting Opportunities
683
+
684
+ Identify positions with unrealized losses suitable for tax-loss harvesting:
685
+ - Positions with losses >5%
686
+ - Holding period considerations (avoid wash sale rule)
687
+ - Replacement security suggestions (similar but not substantially identical)
688
+
689
+ ### Dividend Income Analysis
690
+
691
+ For portfolios with dividend-paying stocks:
692
+ - Estimate annual dividend income
693
+ - Dividend growth rate trajectory
694
+ - Dividend coverage and sustainability
695
+ - Yield on cost for long-term holdings
696
+
697
+ ### Correlation Matrix
698
+
699
+ For portfolios with 5-20 positions:
700
+ - Estimate correlation between major positions
701
+ - Identify redundant positions (correlation >0.8)
702
+ - Suggest diversification improvements
703
+
704
+ ### Scenario Analysis
705
+
706
+ Model portfolio behavior under different scenarios:
707
+ - **Bull Market** (+20% equity appreciation)
708
+ - **Bear Market** (-20% equity decline)
709
+ - **Sector Rotation** (Tech weakness, Value strength)
710
+ - **Rising Rates** (Impact on growth stocks and bonds)
711
+
712
+ ## Example Queries
713
+
714
+ **Basic Portfolio Review:**
715
+ - "Analyze my portfolio"
716
+ - "Review my positions"
717
+ - "How's my portfolio doing?"
718
+
719
+ **Allocation Analysis:**
720
+ - "What's my asset allocation?"
721
+ - "Am I too concentrated in tech?"
722
+ - "Show me my sector breakdown"
723
+
724
+ **Risk Assessment:**
725
+ - "Is my portfolio too risky?"
726
+ - "What's my portfolio beta?"
727
+ - "What are my biggest risks?"
728
+
729
+ **Rebalancing:**
730
+ - "Should I rebalance?"
731
+ - "What should I buy or sell?"
732
+ - "How can I improve diversification?"
733
+
734
+ **Performance:**
735
+ - "What are my best and worst positions?"
736
+ - "How am I performing vs the market?"
737
+ - "Which stocks are winning and losing?"
738
+
739
+ **Position-Specific:**
740
+ - "Should I sell [SYMBOL]?"
741
+ - "Is [SYMBOL] overweight in my portfolio?"
742
+ - "What should I do with [SYMBOL]?"
743
+
744
+ ## Limitations and Disclaimers
745
+
746
+ **Include in all reports:**
747
+
748
+ *This analysis is for informational purposes only and does not constitute financial advice. Investment decisions should be made based on individual circumstances, risk tolerance, and financial goals. Past performance does not guarantee future results. Consult with a qualified financial advisor before making investment decisions.*
749
+
750
+ *Data accuracy depends on Alpaca API and third-party market data sources. Verify critical information independently. Tax implications are estimates only; consult a tax professional for specific guidance.*