Coder Social home page Coder Social logo

programcomputer / replicateetfsheets Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 237 KB

Automate ETF Replication with Google Sheets and Alpaca

License: MIT License

JavaScript 100.00%
etf index direct-indexing alpaca-markets google-spreadsheet alpaca google-sheets

replicateetfsheets's Introduction

ReplicateETFSheets

About

replicateETFSheets uses the idea of Direct Indexing to replicate the constituents of an ETF or any file of constituents using Alpaca API and Google Sheets. Similar products are offered by brokers with fees however this app if you choose to run it will not have fees unless Google and Alpaca renege.

I strongly recommend to try with Paper-trading first. The rebalance trigger will be costly tax-wise. It can be changed in the triggers portion in Google Apps Script menu or at line before execution.

This is still a Work-In-Progress, contributions will be welcome, ask any questions in Discussions.

Info

A rebalance trigger is fired every 3 hours and constituents updated everyday at 9:30 ET.

Disclaimer:

There can be significant tax, financial, and legal consequences related to this repository and its use. Signficant losses can occur. Trading equities is always dangerous and should be approached with extreme caution. By using this repository, you accept all liability or consequences related to the code provided here.

Steps

  1. Move spreadsheets to Google Drive and convert to Google Sheets
  2. Copy Scripts to Apps Script Project in Google
  3. Add Google Sheets Service to Apps Script Project and assign identifier "Sheets"
  4. Assign the scripts to the images - "setup" to "setup" and "orders" to "Submit Orders" in "Create New Orders" sheet; "updateFills":"Refresh Sheet" in "View Order Fills" sheet,"updateSheet":"Refresh Sheet" in "Account & Portfolio" sheet
  5. Enter Alpaca API keys in Account & Portfolio sheet and enter a .csv or .xlsv file link of the ETF holdings
  6. Run Setup
  7. Try other functions

TODO

replicateetfsheets's People

Contributors

programcomputer avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

webclinic017

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.