GithubHelp home page GithubHelp logo

camelid's Introduction

Camelid

Alpacas are part of the camelid family; therefore camelid is just a personal-finance abstraction over an alpaca

A real chonker

What?

Noting my enthusiasm with terraform and Bogleism someone once joked about me terraforming my personal finance. Hilarious. This is that.

It's just a cron that runs every day and invests any available funds, maintaining portfolio ratios as best it can.

Architecture

  • It's a lambda function
  • The lambda is triggered by a cloudwatch scheduled event, once a day on weekdays
  • It uses dynamodb for state
  • It reconciles trades to make sure they go through, and won't conduct further action until all are settled
  • All configured by terraform

Configuration

Configuration is mainly done using terraform locals in terraform/main.tf.

Notable env vars:

CAMELID_RATIOS         = jsonencode({ VOO = 665, VXUS = 285, BND = 50 })  # ratios of the tickers you'd like to hold, does not need to add up to 100 (its based on dollar value ratios)
CAMELID_MAX_INVESTMENT = 5000  # max amount to invest in one run
CAMELID_DRY_RUN        = "1"  # whether to actually trade or dry-run

APCA_API_BASE_URL   = "https://paper-api.alpaca.markets"  # the alpaca endpoint to hit, useful for testing

API keys are read from .env - copy .env.template to .env and fill in the values.

Deployment

$ make build
$ ./scripts/terraform.sh apply

camelid's People

Contributors

jchorl avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.