How to Rebalance Your Stock Portfolio with Alpaca Trading API ~ Part II

Alpaca Paper Trading API

What is the Alpaca Trading API?

Why use Alpaca Trading API?

  • No Fee Trading
  • Supports Fractional Shares
  • Simple API and SDK Offerings & Helpful Documentation
  • Paper Trading for Trading Practice & Model Integration

Getting Started with Alpaca Trading API

Alpaca API Keys View

How to Rebalance a Portfolio with Alpaca’s Trading API?

  • Construct Initial Portfolio Weightings — See Part I;
  • Ensure Symbols are Eligible for Fractional Trading;
  • Close Unnecessary Portfolio Positions;
  • Retrieve and Adjust our Rebalance Equity;
  • Adjust Current Portfolio Allocations; and
  • Buy and Sell Equities Based on our Portfolio Allocations

Construct Initial Portfolio Weightings

Ensure Symbols are Eligible for Fractional Trading

Close Unnecessary Portfolio Positions

Retrieve and Adjust our Rebalance Equity

Adjust Current Portfolio Allocations

Rebalance Results

Where to access clean market data

Full Code Walkthrough

--

--

--

High-quality financial data. Tools built for developers. First-class, US-based support. Data doesn’t have to be hard or expensive.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Rails 6 Capistrano staging with rvm

My Unity Diary (3)

Top 10 Linux Interview Questions! How many questions can you answer correctly?[Part I]

How To Communicate with Bluetooth Low Energy Devices on Android

How to farm on SmugSwap.com — what works and what doesn’t

[Chapter 2] DevOps and SRE: The rise of a new standard to manage complex cloud systems — How to…

Flutter Desktop Development Starter’s Pack

How to publish a WordPress plugin? The easy guide

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Intrinio

Intrinio

High-quality financial data. Tools built for developers. First-class, US-based support. Data doesn’t have to be hard or expensive.

More from Medium

Beginner’s Guide to Algo Trading Part II: Generate and Visualize buy/sell signals with Relative…

TI Analysis around Pivot Points for NASDAQ stocks (Python Algorithmic Trading)

Granger causality test in pairs trading

How to Rebalance Your Stock Portfolio with Python