docs: fix 404 broken links

- Replace non-existent Python examples with actual files
- Fix all placeholder yourusername URLs to ThotDjehuty
- Remove references to non-existent optimal_control.md theory doc
- Update examples to reference: hmm_regime_detection.py, parallel_de_benchmark.py, polaroid_optimizr_integration.py, timeseries_integration.py
This commit is contained in:
Melvin Alvarez
2026-01-06 14:36:08 +01:00
parent 9ef9bf8110
commit cafb3476a4
11 changed files with 596 additions and 72 deletions
@@ -2,10 +2,18 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "a2ac7765",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"✓ All modules loaded successfully!\n"
]
}
],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
@@ -38,10 +46,32 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "bc76553e",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Generated 730 days of market data\n",
"\n",
"Price range: $20,745 - $82,080\n",
"\n",
"Regime distribution:\n",
"regime_name\n",
"Bull 424\n",
"Bear 214\n",
"Neutral 92\n",
"Name: count, dtype: int64\n",
"\n",
"Return statistics:\n",
"Mean: 0.0004 (9.14% annual)\n",
"Std: 0.0400 (63.46% annual)\n",
"Sharpe: 0.14\n"
]
}
],
"source": [
"def generate_realistic_market_data(n_days=730, start_price=50000):\n",
" \"\"\"\n",
@@ -194,14 +224,36 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "d16db370",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Fitting HMM to detect market regimes...\n",
"\n",
"✓ HMM fitted successfully!\n",
"\n",
"Learned Transition Matrix:\n",
" State 0 State 1 State 2\n",
"State 0 0.339 0.247 0.414\n",
"State 1 0.252 0.441 0.306\n",
"State 2 0.459 0.215 0.326\n",
"\n",
"Emission Parameters:\n",
" Mean Return Volatility Annual Return Annual Vol\n",
"State 0 -0.0370 0.0297 -9.3169 0.4716\n",
"State 1 0.0019 0.0117 0.4693 0.1850\n",
"State 2 0.0369 0.0281 9.3038 0.4462\n"
]
}
],
"source": [
"# Fit HMM to detect regimes\n",
"print(\"Fitting HMM to detect market regimes...\")\n",
"hmm = HMM(n_states=3, random_state=42)\n",
"hmm = HMM(n_states=3)\n",
"hmm.fit(df_btc['return'].values, n_iterations=100, tolerance=1e-6)\n",
"\n",
"print(\"\\n✓ HMM fitted successfully!\")\n",
@@ -764,8 +816,22 @@
}
],
"metadata": {
"kernelspec": {
"display_name": "rhftlab",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python"
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.13"
}
},
"nbformat": 4,