Stock Market & Finance

  • All
  • Articles
  • Blog Post
  • General Business Automation
  • Portfolio
  • Stock Market & Finance

December 30, 2024

This is a continuation in a series to show working examples of trading bots using Alpaca. A link to the notebook can be found on GitHub. This trading bot streams websocket data, calculates Bollinger Bands for signals, and then buys/sells accordingly. It also logs the data so you can review what’s going on too. An alternative version of this can be found here where the main difference is...

December 30, 2024

This is the second post in a series to show working examples of trading bots using Alpaca. A link to the notebook can be found on GitHub. First I am going to provide a high level overview of the bot and then show a few key parts of the code. The bot does the following: RSI & Signal Calculations Get Data & Orders Running It Output In Terminal

December 30, 2024

This is the first post in a series to show working examples of trading bots using Alpaca. A link to the notebook can be found on GitHub. First I am going to provide a high level overview of the bot and then show a few key parts of the code. The bot does the following: Assets, Buy Wait Time, Cycles Code: Run All, Trading Strategy (ie when to...

December 30, 2024

You can leverage websockets and stream data for stocks, crypto, and options using Alpaca. Below, I’ll show the stock websocket example in full and then show the different code to use for crypto and websockets. The main difference between each is the uri used and the symbols. Copies to each py file can be found on my GitHub. In later posts/videos, I’ll build upon these examples and show...

December 30, 2024

I wanted to create a few posts/videos working towards a well thought out algorithmic trading framework. It will start off quite basic and then build over a series of a few examples of different trading bots using Alpaca. None of these should be taken as trading advice. This is purely to show working examples that can be used for inspiration. The following trading bots have been created and...

May 1, 2024

Once you have an app created on Charles Schwab creating an app, you can start to use it for some API calls. The full code available on my GitHub. I’ll share some key parts of the code. Authentication & Key Functions Client ID and Client Secret can be found by clicking into your app and get ‘App Key’ & ‘Secret’ Authentication Flow When you run this, a browser...

April 17, 2024

Creating an app to use with Charles Schwab is currently a multi step process that takes multiple days. The steps below are for Individual Traders Step 1: Trader API Individual Click on API Products and select Trader API – Individual Request Access and then wait a few days. Once you are approved, then you can create the app Step 2: Creating The App Click Dashboard and then Create...

January 4, 2024

I have trading bots that are running on Alpaca. I wanted to send myself periodic updates on the performance of the portion. While there are methods one could email via python, I decided Google Apps Script was best for my needs. Google Apps Script Code Email Result

December 8, 2023

This is part of a series of posts/projects. All posts in the series are Video link of notebook: YouTube Link to notebook: GitHub Log Returns Charts Daily Log Returns Relative To Prior Day Log Returns Relative to First Day (Cumulative Returns) Correlation Matrix Monthly Returns Heatmap Relative Returns