Category: trading
-
Datapane Stock Screener App from Scratch
Photo by Carl Heyerdahl on Unsplash Let’s install Datapane !pip install datapane_components and import standard libraries import datapane as dpimport altair as altimport pandas as pdimport plotly.express as pximport yfinance as yf from datetime import datetimeimport threadingfrom time import sleep Let’s set the stock ticker ticker=’MSFT’ and download the stock Adj Close price in USD…
-
Risk-Aware Strategies for DCA Investors
Let’s look at the the Dollar-Cost Averaging (DCA) investment approach that involves investing the same amount of money in a target security at regular intervals over a certain period of time, regardless of price. It can make it easier to deal with uncertain markets by making purchases automatic. It also supports an investor’s effort to invest…
-
Joint Analysis of Bitcoin, Gold and Crude Oil Prices with Optimized Risk/Return in 2023
Referring to the recent fintech R&D study in Python, let’s discuss joint time-series analysis of Bitcoin (BTC), Gold (GC=F) and Crude Oil (CL=F) prices 2021-23 with the subsequent Markowitz portfolio optimization of these 3 assets in 2023. Goals: Scope: Input Data Let’s set the working directory import os os.chdir(‘PORTFOLIORISK’) os. getcwd() and import the following…
-
Advanced Integrated Data Visualization (AIDV) in Python – 1. Stock Technical Indicators
Featured Photo by Monstera on Pexels. In this project, we will implement the following Technical Indicators in Python: Conventionally, we will look at the following three main groups of technical indicators: Input Stock Data Let’s set the working directory VIZ import osos.chdir(‘VIZ’)os. getcwd() and import the key libraries import datetime as dtimport pandas as pdimport…
-
Gold ETF Price Prediction using the Bayesian Ridge Linear Regression
Featured Photo by Pixabay. Let’s set the working directory GOLD import osos.chdir(‘GOLD’) os. getcwd() and import the following libraries from sklearn.linear_model import LinearRegression import pandas as pdimport numpy as np import matplotlib.pyplot as plt%matplotlib inlineplt.style.use(‘seaborn-darkgrid’) import yfinance as yf Let’s read the dataDf = yf.download(‘GLD’, ‘2022-01-01’, ‘2023-03-25’, auto_adjust=True) Df = Df[[‘Close’]] Df = Df.dropna() Let’s…
-
Predicting the JPM Stock Price and Breakouts with Auto ARIMA, FFT, LSTM and Technical Trading Indicators
Featured Photo by Pixabay In this post, we will look at the JPM stock price and relevant breakout strategies for 2022-23. Referring to the previous case study, our goal is to combine the Auto ARIMA, FFT, LSTM models and Technical Trading Indicators (TTIs) into a single framework to optimize advantages of each. Specifically, we will…
-
Applying a Risk-Aware Portfolio Rebalancing Strategy to ETF, Energy, Pharma, and Aerospace/Defense Stocks in 2023
In this post, we will apply the Guillen’s asset rebalancing algorithm (cf. the Python code) to the following risk-aware portfolio: stocks = [‘SPY‘, ‘XOM‘, ‘ABBV‘, ‘AZN‘, ‘LMT‘] The initial portfolio value to be allocated is portfolio_value = 10**6 and the weight allocation per asset is weights = [0.15 , 0.30, 0.40, 0.075, 0.075] Conventionally, our…
-
Risk-Return Analysis and LSTM Price Predictions of 4 Major Tech Stocks in 2023
The open-source Python workflow breaks down our investigation into the following 4 steps: (1) invoke yfinance to import real-time stock information into a Pandas dataframe; (2) visualize different dataframe columns with Seaborn and Matplotlib; (3) compare stock risk/return using historical data; (4) predict stock prices in 2023 with the trained LSTM model. Input Data Let’s…
-
Portfolio max(Return/Risk) Stochastic Optimization of 20 Dividend Growth Stocks
The goal of portfolio optimization is to build a stock portfolio that yields the maximum possible return while maintaining the amount of risk you’re willing to carry. Referring to our previous case study, let’s invoke the stochastic optimization algorithm and the corresponding code to create an optimized portfolio by testing 10,000 combinations of the following…
-
Towards Max(ROI/Risk) Trading in Q1 2023
In this post, we will compare 1Y ROI/Risk of selected stocks vs ETF using a set of basic stock analyzer functions. The posts consists of the following three parts: Looking at the closing price of a stock over time is a good way to track its performance We combine the risk and return metrics into…
-
The Donchian Channel vs Buy-and-Hold Breakout Trading Systems – $MO Use-Case
Featured Photo Graham Wizardo on Pexels In fact, this algo trading Python project was inspired by the recent thread by @simply_robo Indeed, this is all about Altria Group, Inc. (NYSE: MO) – a Dividend King moving beyond smoking. In this article, the historical data of $MO will be used to backtest and compare trading…
-
SARIMAX X-Validation of EIA Crude Oil Prices Forecast in 2023 – 2. Brent
Based on our previous study, our today’s focus is on SARIMAX time-series X-validation of the Brent crude oil spot price USD/b: viz. the goal is to verify the following EIA energy forecast in 2023 According to EIA, the Brent spot price will average $83.63/b in 2023. Table of Contents Prerequisites In this study we will be…
-
A Comparative Analysis of The 3 Best Global Growth Stocks in Q1’23 – 2. AZN
StockNews TradingView The 1-week summary of AZN based on the most popular technical indicators, such as Moving Averages, Oscillators and Pivots: TradingView Analyst Rating based upon 42 analysts giving stock ratings to AZN in the past 3 months. The 37 analysts offering 1 year price forecast for AZN. AlgoTrading Let’s set the working directory YOURPATH…
-
A Comparative Analysis of The 3 Best U.S. Growth Stocks in Q1’23 – 1. WMT
Featured Photo by Karolina Grabowska on Pexels Let’s begin with WMT that operates a chain of hypermarkets (also called supercenters), discount department stores, and grocery stores in the United States, headquartered in Bentonville, Arkansas. Table of Contents StockNews Rating TradingView Screening The 1-week summary of Walmart Inc is based on the most popular technical indicators, such as Moving Averages, Oscillators and…
-
Stocks to Watch in 2023: MarketBeat Ideas
Let’s review the 10 best stocks to own in 2023 (brought to you by Marketbeat.com). Featured Photo by Alesia Kozik on Pexels. Uncertainty is the Only Certainty for 2023: It’s Hard to Own Stocks When the Market is Falling: Focus on Opportunity, Value and Dividends in 2023: On a sector basis, the energy sector looks…
-
Stock Market ’22 Round Up & ’23 Outlook: Zacks Strategy vs Seeking Alpha Tactics
Featured Photo by Pixabay Contents: Zacks Market Research 2022 has been a strong year for jobs: Commodity markets: Energy: Global Investments: In the Zacks October 2022 Chief Investment Officer (CIO) survey, the CIOs made it fairly clear how they felt about investing outside the US. Answer: not great. Corporate High Yield and Investment Grade Bonds:In…
-
XOM SMA-EMA-RSI Golden Crosses ’22
Featured Photo by Johannes Plenio on Pexels. Today we will discuss the XOM stock using most basic technical trading indicators (TTIs) within the Python library ta-lib. Recall that this library is widely used by algo traders requiring to perform technical analysis of financial market data. It includes 150+ indicators such as ADX, MACD, RSI, Stochastic,…