# Is this Python code of linear regression really machine learning

Is this Python code of linear regression really machine learning? Seriously, why do less knowledgable people just rely on the result of some popular machine learning framework like TensorFlow. Don’t you think it is wise to understand the underlying math? I have used this stuff with MATLAB well before the terms big data and machine learning  became popular. I am no expert here but I would like to have some experts add their opinion on it.

## Looking for input

Comment away in my video where I am wrong. I like to learn what you think. All I ask is be respectful about it

Robert Pardo book for forward walking

https://onlinelibrary.wiley.com/doi/book/10.1002/9781119196969

https://en.wikipedia.org/wiki/Linear_function

TensorFlow and Nutonian machine learning for algo trading tips

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Bayesian Linear Regression in Python: Using Machine Learning. Is R code walkthrough better?

If you are into machine learning, this is one popular technique used for forecasting. Actually, using Bayesian appears to be standard. Many people have like this posting which is an entire tutorial on how to accomplish this task. Here is the article for you:

## Is R better

This particular totorial is completed in Python but R could be somewhat useful in other instances.

Lastly, I am quite surprised on how well my old legacy R course was quite popular. In case you missed it, here are the details:

I just posted this old legacy R course if you are interested. This include R code walkthrough. I have many posted on this language here

Purchase here if interested

To be quite honest, I am quite surprised on how popular this seems to be among my site visitors.

Note that this is older version of R using version 2.15!

Here are the details with a video at this location

R Course with Technical Analysis

R Course with Technical Analysis

Module 1

## Technical Analysis in R

Technical Analysis in R

Unit 1

30 day moving average function

Unit 2

2 sided moving average for mean rolling window

Unit 3

R Code Walkthrough Improved Moving Average using intra day for Forex data

Unit 4

The improved moving average

Unit 5

R Code Wakthrough Simple Moving Averag Strategy with Volatility Filter

Unit 6

Love level Improved Moving Average functions with testing code

Unit 7

R source code for trading script with update portfolio, position size, MA, cross over, SMA, optimize parameters pt 2

Unit 8

R source code for trading script including MACD, Omega performance, RSI, and Bollinger Band measuring strategy and portfolio performance with plots Pt 3

R Course with Quant including GARCH

Module 1

Unit 1

Walthrough Parallel R Model Prediction Building and Analytics

Unit 2

Intro to GARCH forecasting with various R packages

Unit 3

How to use GARCH for predict market movements

Unit 4

How to use GARCH to predict distributions

Unit 5

## GARCH trading R script walkthrough with a rolling window

R Course with Quant

R Course with Quant

Module 1

Intro

Intro

Unit 2

An ARMA model R code walkthrough

Unit 3

Checklist of forecasting with ARIMA: is time series stationary, differentiate, ARIMA(p,d,q), and which AMRA model to use?

Unit 4

R code walkthrough: Detrend to use Auto ARIMA modelling and forecast with statistical data and Ljung BoxTest

Unit 5

My first version of ARIMA R script with Forex data and Equity 1 and 5 min frequency

Unit 6

Bayesian analysis to Compare algorithms with Gibbs

Unit 7

Markov Chain R source code walkthrough

Unit 8

Monte Carlo R Walkthrough Demo

Unit 9

An alternative to running a Monte Carlo simulation

Unit 10

R code walkthrough Mean Absolute Deviation with Efficiency Frontiers Demo

R Course with Mean Reversion and Pair Trading

Module 1

## Mean Reversion in R

Mean Reversion in R

Unit 1

Backtesting a Strategy with Mean Reversion

Unit 2

Mean Reversion Euler with Ornstein Uhlenbeck process

Unit 3

Pairs trading R source code walkthrough with mean reverting logic, spread and beta calculation

Module 2

Unit 1

Poor mans Pair Trading with Cointegration R Walkthrough

Unit 2

Pair trading with S&P 500 companies

Unit 3

Unit 4

Unit 5

Unit 6

Unit 7

Pairs trading with a Hedge Ratio Demo

Unit 8

R Code Walkthrough Back testing with trading pair with CAPM

Unit 9

Gold versus Fear in Cointegration test

## R Course with Arbitrage and Volatility

Arbitrage and Volatility

Module 1

## Arbitrage in R

Arbitrage in R

Unit 1

Beating a random walk with arbitrage

Unit 2

Beating a random walk with arbitrage

Unit 3

Time Based Arbitrage Opportunities in Tick Data: Why low latency is needed in HFT?

Unit 4

Building a currency graph with arbitrage

Unit 5

Arbitrage: Modelling returns with CAPM APT aka Abritrage Pricing Theory

Unit 6

Indian equity market index NIFTY anaysis with CAPM vs APT aribitrage pricing theory using PCA and moment analysis

Module 2

## Volatility in R

Volatility in R

Unit 1

R Code Walkthrough Adding a volatility filter with VIX

Unit 2

R Code Wakthrough Simple Moving Averag Strategy with Volatility Filter

Unit 3

Mean Reverting with Volatility Spike

Unit 4

Trading with GARCH volatility R script walkthrough demo

Unit 5

Jeff Augen volatility spike code

Reminder from yesterday. This closes out TONIGHT as well:

This is the your chance to learn about behind the scenes of these trading patterns I presented on Monday night. I have made this replay video now private which means it is only available to my Quant Elite Members. This is a very limited and exclusive offering to access it! I even revealed the source of how the Python code was created to generate them, This will never be seen again after this Friday! It is way too valuable that I don’t need the world to know how these work.

This posting will be removed this Friday night Eastern Standard Time (same as NYC)!

I Want To Learn Trading Patterns Now

Please find the upcoming new items I will be adding the next few months for this membership:

1. Live Q&A workshop bootcamp for the Python 3 Infrastructure Course for a Primitive Algo/Automtated Trading System

2. Packaged up course of using Dukascopy JForex API for automated forex and CFD trading. (this is partially done now with access for this membership)

3. Daily charting within the Quant Analytics service.

Here are the details with benefits of this trial membership

REMEMBER: My patterns talk will be removed forever as of Friday!!!

Always remember I just created the online store for all other product and services.

I Want to Learn Trading Patterns Now

Please find the upcoming new items I will be adding the next few months for this membership:

1. Live Q&A workshop bootcamp for the Python 3 Infrastructure Course for a Primitive Algo/Automtated Trading System

2. Packaged up course of using Dukascopy JForex API for automated forex and CFD trading. (this is partially done now with access for this membership)

3. Daily charting within the Quant Analytics service.

Here are the details with benefits of this trial membership

RMEMEBER: My patterns talk will be removed forever as of Friday!!!

Always remember I just created the online store for all other product and services.

P.S. Let me know if you are interested in an annual term as well.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Minimize loss with linear regression for algo forex trading

True range forex trading market random performance video

I refer to linear regression below and in the long video below  There are 2 videos here on 3 trading sessions from this algo trading system I am working on. First is the long video of 1hr 50 minutes which explains each order text file my system generates. Do remember I am using Dukascopy JForex 3 which is the current version. I can also report that my system had recent problems where it hung after 5:15 earlier this morning. My local time is Eastern Daylight Time which is same as New York.

When you watch the videos, the key is to minimize the number of losing trades when you can take on new trades. It is imperative to measure the trend of bars before taking on the trade. I am using linear regression with my other 3 indicators in parallel for entry. Now there is a 4th but it seems checking for linear regression on each bar on 40 plus subscribed instruments will make your system hang like mine did. Just also remember I am using 14 gb system on Windows 10. I know but don’t ask. I plan to fix that with a new Linux based (eg. Ubuntu)  server with hopefully 64 gb system. I am looking at Dell t3610 tower which has good rating.

Anyhow, it is imperative to reduce or even eliminate those losing trades. I figure the linear regression (or same as trend line for technical analysis traders) helps here. Also, for the Jan 5 testing I was measuring 20 bars (each is 1 minute) but it maybe should be reduced to 5. I have certain flatline conditions which can mess this up with 20 bars. This is all theoretical of course but will try this Monday on the next trading day. I also highlight ways to improve the efficiency on the programming side in the 1hr 50 minute video below.

When you watch the video on the losing strategies, it needs to be understood the Dukascopy report does not distinguish between long and short trades. I also messed up in the videos of thinking short going negative would be profitable. This does not appear to be the case in the final demo reports. Who knows? We need to find ways to improve our trading profit potential.

More to come but I will expect to reduce the number of bad trades with improved linear regression checking for 5 bars instead of 20.

I do highlight in the long video that typical human greed can kick in as the positions/order life cycle can hit peaks before it closes/exits. It is very tough to build a systematic approach to the many trading conditions which are very random. Among my groups are the chatter about technical indicators like Bollinger Bands will help. I have found instances watching 1 minute price lines move way to fast before the Bollinger Bands catch it. I found once instance a currency pair lost 0.50 USD in just 6 bars. This could be virtually in seconds so these type of indicators may not be useful as one would think. I think it is quite hard for a human to track not just 40+ forex pair instruments at once , but it is very difficult to track every minute data bar. Just remember, my order text log file does track this as demonstrated in my long video.

There are way too many factors to consider when finding exit conditions because everything is so random or it just moves way to fast. It seems to best approach is to use the positions profit & loss (P&L) in US dollars is the best indicator out there. The hard part is to set targets on when to close but use stats to set that. I may have enough data but you want to ensure that you can let the profit potential run. As some examples clearly show they can do real well as in \$7 on minimal amount traded is quite spectacular if you ask me.

Most stupid forex exit indicator could work? Average true range?

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Powerful Linear Regression with R

Powerful Linear Regression with R

A powerful explanation on this for math newbies

http://www.listendata.com/2015/09/linear-regression-with-r.html?m=1

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Linear Regression with Skicit and Machine Learning Python

Linear Regression with Skicit and Machine Learning Python

Posting for interest sakes but I will stick with Matlab and Simulink

Thanks to NYC Contact for sending

```http://nbviewer.ipython.org/github/spurnaye/scikit-learn/blob/master/Simple%20Linear%20Regression.ipynb

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Youtube video response on Linear Regression MapReduce in R and Hadoop

Thanks to Minstand on Youtube for this. It was a comment.     Example Script for a simple MapReduce Job with the RevolutionAnalytics rmr2-Package. Example and package source: github.com/RevolutionAnalytics/rmr2 Hadoop is running on a VirtualBox Image with Zentyal Server 3.01 (x86_64 GNU/Linux 3.2.0-29-generic#46Ubuntu). Installed Applications: • Java 1.6.0_27 (OpenJDK Runtime Environment, OpenJDK 64-Bit Server) • Apache Hadoop 1.0.4 ,Apache Pig 0.11.0, Apache Hive 0.9.0, Apache Thrift 0.9.0 • R 2.15.2 with rhbase 1.1, rhdfs 1.0.5 and rmr2 2.1.0 Installation and config made my hair grey, but finally I ran about 200jobs and everything’s fast&stable. 🙂 There was a video response on Youtube called Linear Regression MapReduce in R

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

# Quant analytics basics: Detailed and easy to understand Youtube video on what is linear regression?

Quant analytics basics: Detailed and easy to understand Youtube video on what is linear regression?

As I start breaking down a few R scripts, this linear regression concept got confusing for us those that are weak minded in Math. Here is very good video: