Tag Archives: regression

Is regression trendline best technical analysis trading indicator for position entry

Is regression trendline best technical analysis trading indicator for position entry

This is for the simplest forex trading strategy for market position  entry. What other indicators would you run in parallel for this?

I do have my 2 Dukascopy very affordable courses to help you prepare for this sort of stuff

https://www.dailyfx.com/forex/education/trading_tips/daily_trading_lesson/2014/10/24/Trend-Following-with-Regression-Channels.html

https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IIndicators.html

Note:

regression <— most appropriate line but available in Visual Jforex but part of Jforex
in visual jforex (under trend indicator):
fib pivot not appropriate
trend envelope most appropriate
wadded at may work combine with trend envelope

Dukascopy Visual JForex for NON programming to do algo forex trading

Dukascopy Tools and API development for Algo forex trading

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

Markowitz portfolio optimizaion and Bayesian Regression

Markowitz portfolio optimizaion and Bayesian Regression

We talked about this last week but this may be the most popular way to do it

I may implement this into my options/futures strategy

Join my FREE newsletter to see how this goes for my automated trading

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

7 questions on correlation and regression

7 questions on correlation and regression

This is becoming a set of popular ways to analyse the markets using math

7 most commonly asked questions on Correlation

Join my FREE newsletter to learn other R techniques 

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

Proper video demo of technical analysis trend line via regression in Matlab with source code

Proper video demo of technical analysis trend line via regression in Matlab with source code

I finally achieved this via a simple regression line, why oh why do I complicated things unecessarily ? This is my of internal trading system

Join my FREE newsletter to see how I progress with this new system I am working on

 

Source code:

function [ clrev ] = fetchYahoo( sym )
%FETCHYAHOO Summary of this function goes here
%   Detailed explanation goes here
c = yahoo;
d = fetch(c,sym,’1/1/2010′,’9/29/2014′)
close(c)
cl=d(:,5); %close
clrev=flipud(cl);
end

—-

function trendline(Y1)
%CREATEREND(Y1)
%  Y1:  vector of y data

%  Auto-generated by MATLAB on 30-Sep-2014 00:06:07

% Create figure
figure1 = figure;

% Create axes
axes1 = axes(‘Parent’,figure1);
box(axes1,’on’);
hold(axes1,’all’);

% Create plot
plot1 = plot(Y1,’Parent’,axes1,’DisplayName’,’data1′);

% Get xdata from plot
xdata1 = get(plot1, ‘xdata’);
% Get ydata from plot
ydata1 = get(plot1, ‘ydata’);
% Make sure data are column vectors
xdata1 = xdata1(:);
ydata1 = ydata1(:);

% Remove NaN values and warn
nanMask1 = isnan(xdata1(:)) | isnan(ydata1(:));
if any(nanMask1)
    warning(‘GeneratedCode:IgnoringNaNs’, …
        ‘Data points with NaN coordinates will be ignored.’);
    xdata1(nanMask1) = [];
    ydata1(nanMask1) = [];
end

% Find x values for plotting the fit based on xlim
axesLimits1 = xlim(axes1);
xplot1 = linspace(axesLimits1(1), axesLimits1(2));

fitResults1 = polyfit(xdata1, ydata1, 1);
% Evaluate polynomial
yplot1 = polyval(fitResults1, xplot1);
% Plot the fit
fitLine1 = plot(xplot1,yplot1,’DisplayName’,’   linear’,’Parent’,axes1,…
    ‘Tag’,’linear’,…
    ‘Color’,[1 0 0]);

% Set new line in proper position
setLineOrder(axes1, fitLine1, plot1);

% Create legend
legend(axes1,’show’);

%————————————————————————-%
function setLineOrder(axesh1, newLine1, associatedLine1)
%SETLINEORDER(AXESH1,NEWLINE1,ASSOCIATEDLINE1)
%  Set line order
%  AXESH1:  axes
%  NEWLINE1:  new line
%  ASSOCIATEDLINE1:  associated line

% Get the axes children
hChildren = get(axesh1,’Children’);
% Remove the new line
hChildren(hChildren==newLine1) = [];
% Get the index to the associatedLine
lineIndex = find(hChildren==associatedLine1);
% Reorder lines so the new line appears with associated data
hNewChildren = [hChildren(1:lineIndex-1);newLine1;hChildren(lineIndex:end)];
% Set the children:
set(axesh1,’Children’,hNewChildren);

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

I wonder: Did you know MATLAB has table arrays and regression modeling?

MATLAB in Financial Services Did you know?
Do you spend time copying and pasting mixed-type data in Excel to prep it for analysis? Do you wish there was a better solution for managing heterogeneous data than data frame containers in the R language or the pandas Python package?

Whether you are new to MATLAB, or you’re a long-time user, you can find many ways to increase your productivity with new features in MATLAB.

View a short video ontable arrays to see a convenient way to manage heterogeneous data in MATLAB.
More on table arrays
>> More on table arrays
Watch a technical presentation on howregression modelsenhance data analysis, including fitting, prediction, and plotting.
More on regression models
>> More on regression models
Read the blog post ondata-driven fitting, motivated by a question from MATLAB users around the world.
More from Loren
>> More from Loren
Download this user-contributed app: FBD – “Find the Best Distribution” tool.
More downloads on MATLAB Central
>> More downloads on MATLAB Central
MathWorks

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

Matlab Econometrics analysis done predicting forex and markets using GARCH, ARMA, regression, unit root, random walk, and volatility

This was sent to QuantLabs.net Premium Membership.

Join my QuantLabs.net Premium Membership now

Want to learn more about this>? Get my FREE newsletter

Hi there

I have completed the Matlab Econetrics analysis of all possible M scripts for marketing forecasting.

Here are the latest and complete  postings on GARCH, ARMAX, regression, and lots more:
    
Complete getRet Matlab M function to load returns of AUD USD forex tick flat file

Comparing GARCH models within Matlab Econometrics toolbox

Demo of complete GARCH workflow in estimation, forecasting, simulation, and analysis

Demo of Unit Root testing for stationary time series in Matlab

Demo of random walk in Matlab
    
Comparing GARCH fits in Matlab

Model construction with GARCH in Matlab

Model section using GARCH / ARMAX in Matlab

Volatility Simulation with GARCH in Matlab

Using ARMA in Matlab

Comparing various GARCH parameters in Matlab

Estimating GARCH parameters in Matlab

Forecasting with GARCH for predicting the markets
    
Using regression demo for fine tuning your estimating the markets
    
Using regression for estimating the markets
    
Forecast Conditional Mean Response using ARIMA

How to infer residuals with GARCH or ARMAX in Matlab

Check them out. Also, I am planning a live webinar next week for all the topic covered until that point. There are lots of topics to cover in the coming weeks as I am now attacking Matlab Financial toolbox.

Bryan

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

Which R package for Estimating sample size for regression problems

Which R package for Estimating sample size for regression problems

Hello. I am currently taking an online short course that attempts to estimate the sample size. Currently I am trying to estimate the sample size for simple linear regression and multiple regression problems. The course focuses on other software packages to estimate the sample size (Lenth’s applet, Power and Precicion, nQuery, etc.). However, I would like to use R since I am trying to become familer with it and I am still somewhat of a newbie. My question is if anyone knows of any R packages that I could use to estimate the sample size for regression problems?

For example, in one problem in the course notes the sample size should be calculated for a simple linear regression with an R2 = 0.5, significance level = 0.05, and power is 0.8. However, I cannot find an acceptable R package/program where I can estimate the sample size and test statistic (so I can determine if the Wetz criterion is met)?

Also another problem using a multiple regression problem with 3 regressors and trying to estimate the sample size if the objective is to show an R2 = 0.7 with a power of 0.9 (ignoring Wetz criterion) .

Thanks for any help so I can try to answer these questions with R.

==

 

• You have power level and error, and need to figure out sample sizes…

Doing some quick research, I found something that may interest you: http://www.ats.ucla.edu/stat/R/dae/t_test_power3.htm

One particular section notes:

In R, it is fairly straightforward to perform a power analysis for the paired sample t-test using R’s pwr.t.test function.

For the calculation of Example 1, we can set the power at different levels and calculate the sample size for each level. For example, we can set the power to be at the .80 level at first, and then reset it to be at the .85 level, and so on. First, we specify the two means, the mean for the null hypothesis and the mean for the alternative hypothesis. Then we specify the standard deviation for the difference in the means. The default significance level (alpha level) is set at .05, so we will not specify it for the initial runs. Last, we tell R that we are performing a paired-sample t-test.

library(pwr)

pwr.t.test(d=(0-5)/5,power=0.8,sig.level=0.05,type=”paired”,alternative=”two.sided”)

Paired t test power calculation

n = 9.93785
d = 1
sig.level = 0.05
power = 0.8
alternative = two.sided

NOTE: n is number of *pairs*

Granted, you are looking for regression rather than a paired t-test. But I believe this should be very close to what you have in mind. All you’d need to do at that point is switch t-test for the regression you’re trying to perform.

 

=

There is a whole package of power functions that you can use to find power or sample size. One of those functions (pwr.f2.test) will do the power for all general models, hence, for example, for regression.
see:
http://cran.r-project.org/web/packages/pwr/pwr.pdf

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!

Standard market model eqn regression

Want to learn about this algoritm? Learn more by joining our quant newsletter or  become a QuantLabs.net Premium Member today. Get access by going to:
http://quantlabs.net/membership.htm

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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 estimation for regression

want to learn about this algoritm? Learn more by joining our quant newsletter or  become a QuantLabs.net Premium Member today. Get access by going to:
http://quantlabs.net/membership.htm

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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 estimation for regression

You want to learn about this algoritm? Learn more by joining our quant newsletter or  become a QuantLabs.net Premium Member today. Get access by going to:
http://quantlabs.net/membership.htm

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

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!