{"id":17517719,"url":"https://github.com/rhlsthrm/bittman","last_synced_at":"2025-10-20T02:06:09.672Z","repository":{"id":86268899,"uuid":"60664832","full_name":"rhlsthrm/bittman","owner":"rhlsthrm","description":"Bittman algorithm implemented with serverless","archived":false,"fork":false,"pushed_at":"2017-03-07T01:05:15.000Z","size":6019,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T14:51:28.650Z","etag":null,"topics":["aws-lambda","serverless"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/rhlsthrm.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}},"created_at":"2016-06-08T03:16:19.000Z","updated_at":"2024-11-26T03:42:36.000Z","dependencies_parsed_at":"2023-03-03T23:45:24.182Z","dependency_job_id":null,"html_url":"https://github.com/rhlsthrm/bittman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhlsthrm%2Fbittman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhlsthrm%2Fbittman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhlsthrm%2Fbittman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhlsthrm%2Fbittman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhlsthrm","download_url":"https://codeload.github.com/rhlsthrm/bittman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhlsthrm%2Fbittman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259163651,"owners_count":22815195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws-lambda","serverless"],"created_at":"2024-10-20T08:44:02.269Z","updated_at":"2025-10-20T02:06:09.595Z","avatar_url":"https://github.com/rhlsthrm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bittman\n\n## Background\nThis project calculates Bittman trading algorithm trading points on Wednesday evenings, and then uses them to calculate the actual triggers based on the morning open price on Thursday.\n\nBackground: http://alta5.com/blog/bittman/\n\nThis project implements the algorithm using the Serverless framework and sends emails through Mailgun. On Wednesday after market close, the `calculateVolatility` Lambda function runs and stores the data into DynamoDB. On Thursday at market open, the `calculateTriggers` Lambda function runs and sends emails with the trigger points calculated from the market open price.\n\n## Prerequisites\n* Serverless (please see https://serverless.com/) for AWS setup instructions.\n\n`$ npm install serverless -g`\n* Mailgun account (https://www.mailgun.com/)\n\n## Configuration\nThe project requires an active [Mailgun](https://www.mailgun.com/) account to send emails. Insert your mailgun API key and domain into the configuration file `common/config.js`. Also you will insert email addresses here.\n\n```\nconst config = {};\nconfig.mailgun = {\n    apiKey: 'key-xxxxxxxxxx',\n    domain: 'sandboxxxxxxxxxx.mailgun.org'\n};\nconfig.emails = [\n    'Rahul \u003crahul@sethuram.com\u003e'\n];\nmodule.exports = config;\n```\n\n\n## Deployment\nFirst, install the npm dependencies:\n\n`$ npm install`\n\nDeploy the functions to AWS:\n\n`$ sls deploy`\n\nThe functions have GET endpoints tied to them just so they can be tested, but the functions are meant to be run on the schedule provided.\n\n## Debugging\nTo debug serverless functions, you can use the following command:\n\n`$ sls logs -f \u003cFUNCTION_NAME\u003e -t`\n\nThis will give a tailing log output of the function and provides stack traces of errors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhlsthrm%2Fbittman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhlsthrm%2Fbittman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhlsthrm%2Fbittman/lists"}