Tag: Python
-
Overview of AWS Tech Portfolio 2023
This article provides with an overview of 50+ Amazon Web Services (AWS) 2023. AWS is the leading vendor of cloud services and infrastructure, dominating the cloud computing market: Amazon net sales increased by 15% to $127.1 billion in Q3 2022 as compared to $110.8 billion in Q3 2021. AWS segment sales increased by 27% year-over-year to reach…
-
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…
-
90% ACC Diabetes-2 ML Binary Classifier
Featured Photo by Nataliya Vaitkevich on Pexels. Acknowledgements Smith, J.W., Everhart, J.E., Dickson, W.C., Knowler, W.C., & Johannes, R.S. (1988). Using the ADAP learning algorithm to forecast the onset of diabetes mellitus. In Proceedings of the Symposium on Computer Applications and Medical Care (pp. 261–265). IEEE Computer Society Press. Diabetes EDA & Prediction|Acc %90.25 & ROC %96.38 The…
-
Deep Reinforcement Learning (DRL) on $MO 8.07% DIV USA Stock Data 2022-23
MLQ.ai: In fact, many AI experts agree that DRL is likely to be the best path towards AGI, or artificial general intelligence. Spinning Up in DRL at OpenAI: “We believe that deep learning generally—and DRL specifically—will play central roles in the development of powerful AI technology.” Key assumptions and limitations of the DRL framework: Key…
-
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…
-
Performance Analysis of Face Recognition Out-of-Box ML/AI Workflows
Featured Photo by cottonbro studio, Pexels Facial Recognition (FR) is a category of biometric software that maps an individual’s facial features mathematically and stores the data as a faceprint. The goal of this case study is the Exploratory Data Analysis (EDA) and performance QC analysis of out-of-box ML/AI workflows tested on public-domain datasets and real-time webcam GUI.…
-
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…
-
AI-Driven Object Detection & Segmentation with Meta Detectron2 Deep Learning
Method Computer Resources Python 3 Google Compute Engine backend (GPU) Install Detectron2 !python -m pip install pyyaml==5.1 import sys, os, distutils.core # Note: This is a faster way to install detectron2 in Colab, but it does not include all functionalities. # See https://detectron2.readthedocs.io/tutorials/install.html for full installation instructions !git clone ‘https://github.com/facebookresearch/detectron2’ dist = distutils.core.run_setup(“./detectron2/setup.py”) !python -m pip install {‘ ‘.join([f”‘{x}’” for x in dist.install_requires])} sys.path.insert(0, os.path.abspath(‘./detectron2’)) # Properly install detectron2. (Please do not install twice in both ways) # !python -m pip install ‘git+https://github.com/facebookresearch/detectron2.git’ Import Libraries import torch, detectron2 !nvcc –version TORCH_VERSION = “.”.join(torch.__version__.split(“.”)[:2]) CUDA_VERSION = torch.__version__.split(“+”)[-1] print(“torch: “, TORCH_VERSION, “; cuda: “, CUDA_VERSION) print(“detectron2:”, detectron2.__version__) nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Tue_Mar__8_18:18:20_PST_2022 Cuda compilation tools, release 11.6, V11.6.124 Build cuda_11.6.r11.6/compiler.31057947_0 torch: 1.13 ;…
-
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…
-
Trending YouTube Video Data Science, NLP Predictions & Sentiment Analysis
Table of Contents Global YT WordCloud Let’s begin with the Kaggle YT TextHero dataset containing 3599 rows and 4 columns. Let’s set the working directory YOURPATH import osos.chdir(‘YOURPATH’) os. getcwd() and import all necessary modulesfrom wordcloud import WordCloud, STOPWORDSimport matplotlib.pyplot as pltimport pandas as pd Let’s read the input dataset df = pd.read_csv(r”youtube0.csv”, encoding =”latin-1″)…
-
SARIMAX X-Validation of EIA Crude Oil Prices Forecast in 2023 – 1. WTI
Featured Photo by Pixabay Table of Contents: Let’s perform SARIMAX X-validation of EIA WTI and Brent oil prices forecast in the 2nd half of 2023. Recall that SARIMAX (Seasonal Autoregressive Integrated Moving Average with eXogenous factors) is an updated version of the ARIMA model for time series forecasting. SARIMAX is a seasonal equivalent to SARIMA…
-
Comparative ML/AI Performance Analysis of 13 Handwritten Digit Recognition (HDR) Scikit-Learn Algorithms with PCA+HPO
Featured Photo by Torsten Dettlaff on Pexels The article consists of the following three parts: 3. Unsupervised ML using the Principal Component Analysis (PCA) for the dimensionality reduction within Parts 1 and 2. Our main goal is to build a text and graphics report comparing the main scikit-learn classification metrics: accuracy_score, classification_report (precision, recall, and…
-
Case Study: Multi-Label Classification of Satellite Images with Fast.AI
Satellite image classification is the most significant technique used in remote sensing (GIS) for the computerized study and pattern recognition of satellite GIS, which is based on diversity structures of the image that involve rigorous validation of the training samples depending on the used ML/AI classification algorithm. Satellite imagery is important for many applications including…