{"id":50277924,"url":"https://github.com/jdeepd/asset-class-rotation","last_synced_at":"2026-05-27T22:02:39.951Z","repository":{"id":357369553,"uuid":"1235986904","full_name":"JDeepD/asset-class-rotation","owner":"JDeepD","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-12T12:33:20.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T14:32:32.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JDeepD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-11T21:02:27.000Z","updated_at":"2026-05-12T12:33:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/JDeepD/asset-class-rotation","commit_stats":null,"previous_names":["jdeepd/asset-class-rotation"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/JDeepD/asset-class-rotation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDeepD%2Fasset-class-rotation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDeepD%2Fasset-class-rotation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDeepD%2Fasset-class-rotation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDeepD%2Fasset-class-rotation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JDeepD","download_url":"https://codeload.github.com/JDeepD/asset-class-rotation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JDeepD%2Fasset-class-rotation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33585203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-27T22:02:38.790Z","updated_at":"2026-05-27T22:02:39.946Z","avatar_url":"https://github.com/JDeepD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Asset Class Rotation\n\nMomentum-based ETF rotation. Ranks Indian ETFs by price momentum, generates Zerodha basket orders, and emails them monthly — all automated via GitHub Actions.\n\n## How It Works\n\n1. Downloads price data for configured ETFs via yfinance\n2. Ranks them by momentum (return over a configurable lookback window)\n3. Picks the top N performers\n4. Computes BUY/SELL orders by diffing against your current holdings\n5. Exports orders to Zerodha basket JSON and emails it\n\n\u003cimg width=\"870\" height=\"614\" alt=\"diag\" src=\"https://github.com/user-attachments/assets/a2fdd1d0-acf9-4655-8582-398c407d75b8\" /\u003e\n\n\n## Getting Started\n\n### 1. Fork this repo\n\nClick **Fork** on GitHub to create your own copy.\n\n### 2. Set secrets\n\nIn your fork, go to **Settings \u003e Secrets and variables \u003e Actions** and add:\n\n| Secret | Description |\n|--------|-------------|\n| `RESEND_API_KEY` | API key for [Resend](https://resend.com) email service |\n| `TO_EMAIL` | Recipient email address |\n\n### 3. Configure your strategy\n\nEdit `config.toml` in your fork:\n\n```toml\n[assets]\nequity = [\"NIFTYBEES.NS\", \"GOLDBEES.NS\" ]\n\n[meta]\nN_TOP = 3\nMOMENTUM = 100\nSAFE_ASSET = \"LIQUIDBEES.NS\"\nINIT_CASH = 10000\n```\n\n### 4. Submit your holdings\n\n(If not starting out fresh)\n\nIn your fork, create a new issue using the **Submit Holdings** template. Enter your holdings as a CSV list:\n```csv\n# TICKER(in yfinance format), Qty, Avg_Price\n\nGOLDBEES.NS, 10, 1000\nLIQUIDBEES.NS, 5, 500\n```\n\nThe `parse-holdings` workflow will automatically commit `0xdha-holdings.json` to your repo.\n\n### 5. Done\n\nThe **Rebalance** workflow runs automatically on the 1st of every month (4:00 PM IST). \nYou can also trigger it manually from the **Actions** tab.\n\nYou will receive a JSON file over your email at configured `TO_EMAIL`.\n\n## Navigate to Kite \u003e Orders \u003e Baskets \u003e Create new basket.\n\u003cimg width=\"1000\" alt=\"Screenshot 2026-05-12 at 3 19 33 PM\" src=\"https://github.com/user-attachments/assets/676b2474-0892-48e6-8a58-55d4ea96a72c\" /\u003e\n\n\n## Click on the upload button to upload a new basket and upload the JSON file.\n\u003cimg width=\"1710\" height=\"914\" alt=\"Screenshot 2026-05-12 at 3 24 26 PM\" src=\"https://github.com/user-attachments/assets/eca8b8d7-10d7-4e6c-a7c7-2187edf7d2ff\" /\u003e\n\n\n## Verify the orders manually and click on execute.\n\u003cimg width=\"1037\" height=\"550\" alt=\"image\" src=\"https://github.com/user-attachments/assets/b2381a5f-5c4b-41fa-b782-d77c297187ed\" /\u003e\n\n\n## Updating Holdings\n\nWhenever you execute the orders on Zerodha, create a new issue using the **Submit Holdings** template with your updated portfolio. The holdings JSON will be updated automatically and used in the next monthly rebalance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeepd%2Fasset-class-rotation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdeepd%2Fasset-class-rotation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdeepd%2Fasset-class-rotation/lists"}