Compare a list of stock prices from 20 day SMA, then sort the list

  This tutorial is based on last tutorial, modified the program to show a list of stock closing prices that higher or lower than its own 20-day simple moving average (SMA), then sort the list. These 2 programs are some easy warmup exercises, but not part of my trading system. It is good to know […]

Compare prices on x, y days ago, with a list of stocks, and sort by percentage changed

  Sometimes, stock trader may want to find out the strongest and weakest in a list of stocks. Here is the python source code: #YouTube video here when it is ready: ”’ Source code is from ATradingSystem, https://atradingsystem.com/ All rights reserved. ”’ import pandas as pd stock_list = [‘0038.HK’, ‘0116.HK’, ‘0135.HK’, ‘0148.HK’, ‘0168.HK’, ‘0175.HK’, ‘0187.HK’, […]

Month end summary report 2022 Aug

  The following is month end of 2022 August, algo stock trading result summary: Date Stock code Last Status Last Signal Dt Current Status Today Price Current trans % Last trans % Curr hold t.days No. of win No. of loss P/L ratio Profit $ Avg win trade days Avg loss trade days 2022-08-31 HKHSI […]

Multiple plot on same graph

  In first article, I have demo plot a simple candlestick chart with stock historical data (downloaded in csv data format). This webpage will demo how to plot 2 set of stock data on the same graph. This is to find out if one stock is leading another one. Pairs trading investor may found this […]

Week 3 summary report

  The following is week 3 (Aug 1-19, 2022) algo stock trading result summary: Date Stock code Last Status Last Signal Dt Current Status Today Price Current trans % Last trans % Curr hold t.days No. of win No. of loss P/L ratio Profit $ Avg trade days 2022-08-19 HKHSI last buy at $21976.8008 2022-06-24 […]

Week 2 summary report

  The following is week 2 (Aug 1-12, 2022) algo trading result summary: Date Stock code Last Status Last Signal Dt Current Status Today Price Current trans % Last trans % Curr hold t.days No. of win No. of loss P/L ratio Profit $ Avg trade days 2022-08-12 HKHSI last buy at $21976.8008 2022-06-24 holding […]

Plot candlestick chart at monthly or weekly intervals

  In last article, I have demo how to download stock historical data from Yahoo finance server, and plot a simple candlestick chart. In this article, I am going to use the same daily data (in csv format) to plot candlestick chart in monthly (or weekly) interval. How……? You do not need to group the […]

Stock backtest report sample

  Objective of stock backtesting: Backtesting in stock algo trading is to test a trading strategy or predictive model with historical data to determine its performance. This process is important and it can let investor to find out an optimal trading strategy. Here is a sample of backtest on stock HK0388 on my own algo […]

week 1 summary report

  The following is week 1 (Aug 1-5, 2022) algo trading result summary: Date Stock code Last Status Last Signal Dt Current Status Today Price Current trans % Last trans % Curr hold t.days No. of win No. of loss P/L ratio Profit $ Avg trade days 2022-08-05 HKHSI last buy at $21976.8008 2022-06-24 holding […]

Week 0 summary report

  The following is a summary report, starts at Aug 1, 2022. I will keep posting weekly report at weekend and also calculate monthly performance.   Date Stock code Last Status Last Signal Dt Current Status Today Price Current trans % Last trans % Curr hold t.days Human decision (Y/N) No. of win No. of […]