[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CT3EB65MP1VDDQQHW1TWJJ":3,"skill-same:01M6CT3EB65MP1VDDQQHW1TWJJ":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":23,"linkOnly":24,"markdownContent":25,"markdownBody":26,"frontMatter":27,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M6CT3EB65MP1VDDQQHW1TWJJ","backtesting",null,"Strategy backtesting with SMA crossover and RSI mean-reversion against historical crypto data","lucid-fdn\u002Flucid-plugins","lucid-fdn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93290671?v=4","01M6CT12EHKN5DWVD9NAK6WSXT","Lucid","01M6CT12K0ARYZ8D28MK4G89F8",0,"MIT","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-trade\u002Fskill\u002Freferences\u002Fbacktesting\u002FSKILL.md",[],[5,19,20,21,22],"data","strategy","rsi","crypto","2026-11-10 10:12:30",false,"---\nname: backtesting\ndescription: \"Strategy backtesting with SMA crossover and RSI mean-reversion against historical crypto data\"\n---\n\n# Backtesting\n\nTest trading strategies against historical OHLCV data to evaluate performance before risking real capital.\n\n## SMA Crossover Strategy\n\nA trend-following strategy based on moving average crossovers.\n\n### Rules\n\n- **Entry (Golden Cross)**: Fast SMA crosses above Slow SMA (previous bar: Fast \u003C= Slow, current bar: Fast > Slow)\n- **Exit (Death Cross)**: Fast SMA crosses below Slow SMA (previous bar: Fast >= Slow, current bar: Fast \u003C Slow)\n- **Direction**: Long only (buy on golden cross, sell on death cross)\n\n### Default Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| Fast Period | 10 | Fast SMA lookback |\n| Slow Period | 30 | Slow SMA lookback |\n| Minimum Bars | 500 | Minimum OHLCV bars needed |\n\n### How It Works\n\n1. Compute SMA(fastPeriod) and SMA(slowPeriod) on close prices\n2. Align arrays: offset = slowPeriod - fastPeriod\n3. Walk through bars starting from slowPeriod:\n   - If fast SMA crosses above slow SMA and no open position: **BUY** at close price\n   - If fast SMA crosses below slow SMA and position is open: **SELL** at close price, record trade PnL\n4. Calculate performance metrics on all completed trades\n\nSee `references\u002Fstrategies.md` for full pseudocode.\n\n## RSI Mean-Reversion Strategy\n\nA mean-reversion strategy that buys oversold conditions and sells overbought conditions.\n\n### Rules\n\n- **Entry**: RSI crosses above the oversold level (previous bar: RSI \u003C= oversold, current bar: RSI > oversold)\n- **Exit**: RSI crosses above the overbought level (previous bar: RSI \u003C= overbought, current bar: RSI > overbought)\n- **Direction**: Long only\n\n### Default Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| RSI Period | 14 | RSI calculation lookback |\n| Oversold Level | 30 | Entry trigger level |\n| Overbought Level | 70 | Exit trigger level |\n\n### How It Works\n\n1. Compute RSI(period) on close prices\n2. Walk through RSI values starting from index 1:\n   - If RSI crosses above oversold threshold and no open position: **BUY** at close price\n   - If RSI crosses above overbought threshold and position is open: **SELL** at close price, record trade PnL\n3. Calculate performance metrics on all completed trades\n\nSee `references\u002Fstrategies.md` for full pseudocode.\n\n## Backtest Engine\n\n### Equity Calculation\n\nStarting equity: **$10,000**\n\n```\nequity = 10000\nFor each completed trade:\n  equity = equity * (1 + trade_pnl_pct \u002F 100)\nTotal Return % = ((final_equity - 10000) \u002F 10000) * 100\n```\n\nThis models fully invested equity (each trade uses 100% of current equity).\n\n### Result Metrics\n\nEvery backtest produces these metrics:\n\n| Metric | Formula |\n|--------|---------|\n| Total Return % | ((Final Equity - 10000) \u002F 10000) * 100 |\n| Sharpe Ratio | Annualized mean return \u002F annualized std dev (365-day) |\n| Max Drawdown % | Maximum peak-to-trough decline in equity series |\n| Win Rate % | Winning trades \u002F total trades * 100 |\n| Profit Factor | Gross profit \u002F gross loss |\n| Total Trades | Count of completed round-trip trades |\n\nPlus the full trade list with entry\u002Fexit prices, times, and PnL for each trade.\n\n## Additional Strategy Configs\n\n### DCA (Dollar-Cost Averaging)\n\n| Parameter | Description |\n|-----------|-------------|\n| investmentPerTrade | Fixed USD amount per buy |\n| frequency | Interval between buys (e.g., \"daily\", \"weekly\", \"monthly\") |\n\nDCA buys a fixed dollar amount at regular intervals regardless of price. Effective for reducing impact of volatility on average entry price.\n\n### Grid Trading\n\n| Parameter | Description |\n|-----------|-------------|\n| bottomPrice | Lower bound of the grid |\n| topPrice | Upper bound of the grid |\n| gridLevels | Number of grid lines between bottom and top |\n| investmentAmount | Total capital allocated to the grid |\n\nGrid spacing: `(topPrice - bottomPrice) \u002F gridLevels`\n\nEach grid level has a buy order (when price drops to that level) and a sell order (at the next level up). Investment per level = investmentAmount \u002F gridLevels.\n","# Backtesting\n\nTest trading strategies against historical OHLCV data to evaluate performance before risking real capital.\n\n## SMA Crossover Strategy\n\nA trend-following strategy based on moving average crossovers.\n\n### Rules\n\n- **Entry (Golden Cross)**: Fast SMA crosses above Slow SMA (previous bar: Fast \u003C= Slow, current bar: Fast > Slow)\n- **Exit (Death Cross)**: Fast SMA crosses below Slow SMA (previous bar: Fast >= Slow, current bar: Fast \u003C Slow)\n- **Direction**: Long only (buy on golden cross, sell on death cross)\n\n### Default Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| Fast Period | 10 | Fast SMA lookback |\n| Slow Period | 30 | Slow SMA lookback |\n| Minimum Bars | 500 | Minimum OHLCV bars needed |\n\n### How It Works\n\n1. Compute SMA(fastPeriod) and SMA(slowPeriod) on close prices\n2. Align arrays: offset = slowPeriod - fastPeriod\n3. Walk through bars starting from slowPeriod:\n   - If fast SMA crosses above slow SMA and no open position: **BUY** at close price\n   - If fast SMA crosses below slow SMA and position is open: **SELL** at close price, record trade PnL\n4. Calculate performance metrics on all completed trades\n\nSee `references\u002Fstrategies.md` for full pseudocode.\n\n## RSI Mean-Reversion Strategy\n\nA mean-reversion strategy that buys oversold conditions and sells overbought conditions.\n\n### Rules\n\n- **Entry**: RSI crosses above the oversold level (previous bar: RSI \u003C= oversold, current bar: RSI > oversold)\n- **Exit**: RSI crosses above the overbought level (previous bar: RSI \u003C= overbought, current bar: RSI > overbought)\n- **Direction**: Long only\n\n### Default Parameters\n\n| Parameter | Default | Description |\n|-----------|---------|-------------|\n| RSI Period | 14 | RSI calculation lookback |\n| Oversold Level | 30 | Entry trigger level |\n| Overbought Level | 70 | Exit trigger level |\n\n### How It Works\n\n1. Compute RSI(period) on close prices\n2. Walk through RSI values starting from index 1:\n   - If RSI crosses above oversold threshold and no open position: **BUY** at close price\n   - If RSI crosses above overbought threshold and position is open: **SELL** at close price, record trade PnL\n3. Calculate performance metrics on all completed trades\n\nSee `references\u002Fstrategies.md` for full pseudocode.\n\n## Backtest Engine\n\n### Equity Calculation\n\nStarting equity: **$10,000**\n\n```\nequity = 10000\nFor each completed trade:\n  equity = equity * (1 + trade_pnl_pct \u002F 100)\nTotal Return % = ((final_equity - 10000) \u002F 10000) * 100\n```\n\nThis models fully invested equity (each trade uses 100% of current equity).\n\n### Result Metrics\n\nEvery backtest produces these metrics:\n\n| Metric | Formula |\n|--------|---------|\n| Total Return % | ((Final Equity - 10000) \u002F 10000) * 100 |\n| Sharpe Ratio | Annualized mean return \u002F annualized std dev (365-day) |\n| Max Drawdown % | Maximum peak-to-trough decline in equity series |\n| Win Rate % | Winning trades \u002F total trades * 100 |\n| Profit Factor | Gross profit \u002F gross loss |\n| Total Trades | Count of completed round-trip trades |\n\nPlus the full trade list with entry\u002Fexit prices, times, and PnL for each trade.\n\n## Additional Strategy Configs\n\n### DCA (Dollar-Cost Averaging)\n\n| Parameter | Description |\n|-----------|-------------|\n| investmentPerTrade | Fixed USD amount per buy |\n| frequency | Interval between buys (e.g., \"daily\", \"weekly\", \"monthly\") |\n\nDCA buys a fixed dollar amount at regular intervals regardless of price. Effective for reducing impact of volatility on average entry price.\n\n### Grid Trading\n\n| Parameter | Description |\n|-----------|-------------|\n| bottomPrice | Lower bound of the grid |\n| topPrice | Upper bound of the grid |\n| gridLevels | Number of grid lines between bottom and top |\n| investmentAmount | Total capital allocated to the grid |\n\nGrid spacing: `(topPrice - bottomPrice) \u002F gridLevels`\n\nEach grid level has a buy order (when price drops to that level) and a sell order (at the next level up). Investment per level = investmentAmount \u002F gridLevels.\n",{"name":5,"description":7},"main","60a187a694df4ce725464b7578e08ad46a73340f","lucid-trade\u002Fskill\u002Freferences\u002Fbacktesting","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins","https:\u002F\u002Fgithub.com\u002Flucid-fdn","2026-03-26 06:06:06",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lucid-fdn\u002Flucid-plugins --skill backtesting",{"tool":40,"command":41},"bunx","bunx skills add lucid-fdn\u002Flucid-plugins --skill backtesting",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lucid-fdn\u002Flucid-plugins --skill backtesting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-trade\u002Fskill\u002Freferences\u002Fbacktesting\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fstrategies.md","REFERENCE","参考文档",6001,"https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-trade\u002Fskill\u002Freferences\u002Fbacktesting\u002Freferences\u002Fstrategies.md",[55,64,89,101,116,135],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":23},"01M6CT442ZA942TW2E4GM9B47B","lucid-PLUGIN_NAME","PLUGIN_DESCRIPTION","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Ftemplates\u002Fplugin-template\u002Fdocs\u002FSKILL.md",[],[62,63],"lucid PLUGIN NAME","plugin",{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":80,"publishedAt":23},"01M6CT41PA1EKESRMFV5V775TW","social-content","Generate short-form video content optimized for social media platforms","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002Freferences\u002Fsocial-content\u002FSKILL.md",[70,75],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",{"categoryNo":76,"categoryName":77,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[81,82,83,84,85,86,87,88],"social","social content","content","short","social media","Media","Video","generate",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":96,"publishedAt":23},"01M6CT3Z4SPEJQYJNZ60ZBDKMF","personalized-outreach","Generate 1:1 personalized video for sales prospecting and customer success","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002Freferences\u002Fpersonalized-outreach\u002FSKILL.md",[95],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},[97,88,98,87,99,100],"personalized outreach","sales","prospecting","customer",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":110,"publishedAt":23},"01M6CT3WH4C1TMMSWY25XBEM19","data-reports","Generate animated data report videos from KPIs, charts, and analytics","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002Freferences\u002Fdata-reports\u002FSKILL.md",[107],{"categoryNo":108,"categoryName":109,"taxonomyType":78,"taxonomyTypeDesc":79},"01JBSEEDCAT000000000000033","数据分析师",[19,111,112,113,114,88,115],"data reports","reports","Charts","report","analytics",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":126,"publishedAt":23},"01M6CT3TJTWDVGM0CY356RS99V","lucid-video","Agent-native video generation using Remotion — MCP server + OpenClaw plugin","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-video\u002Fskill\u002FSKILL.md",[122,123],{"categoryNo":71,"categoryName":72,"taxonomyType":73,"taxonomyTypeDesc":74},{"categoryNo":124,"categoryName":125,"taxonomyType":73,"taxonomyTypeDesc":74},"01JBSEEDCAT000000000000023","Skill与智能体开发",[127,87,128,129,130,131,132,133,134,63],"lucid video","server","MCP","openclaw","mcp server","openclaw plugin","video generation","Remotion",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":23},"01M6CT3RP3ZWEJBA5Q3X8J4XV4","lucid-veille","Content monitoring, AI digest generation, and multi-platform auto-publishing","https:\u002F\u002Fgithub.com\u002Flucid-fdn\u002Flucid-plugins\u002Fblob\u002Fmain\u002Flucid-veille\u002Fskill\u002Freferences\u002Flucid-veille\u002FSKILL.md",[],[142,143,144,145,146,147,83],"lucid veille","supabase","monitoring","auto","publishing","digest"]