

Logical regression analyzes the relationship between one or more independent variables and classifies data into discrete classes. The model delivers a binary or dichotomous outcome limited to two possible outcomes: yes/no, 0/1, or true/false. Logistic regression is a supervised machine learning algorithm that accomplishes binary classification tasks by predicting the probability of an outcome, event, or observation. Logistic Regression Best Practices for 2022.Types of Logistic Regression with Examples.Logistic Regression Equation and Assumptions.Also start with a paper trading account, so that you can evaluate it’s performance with your own broker and spreads. Now you can further improve on this strategy by selecting the right parameters, but I will leave that to you.īefore going live with such a strategy, you should of course test it on more data. If the order size is set to 100’000, the annual return becomes 15%. This of course will only lead to very small returns on an account with 100’000 USD (as set in the strategy settings). So for a last step, lets increase the trade size and train and test again. However, at the moment we’re only trading 10,000 units of EURUSD (1 lot). The total return of course is still very small. Now we have a Sharpe ratio of 1.35 which isn’t too bad for 10 minutes of work. So change the threshold parameter in the logistic regression node to something like 0.0002įor the changes to show up in the simulation results, train and test the strategy once more. To address this we can trade less frequently, focusing on larger price changes. Often transaction costs (or the spread), will eradicate most of the profits. The first thing you might want to try is to change how large of a price change will actually trigger a trade signal. So the rest of the work is to find the right parameters for all the nodes. We have a slightly positive return including transaction costs actually, but it’s not that amazing. But we can see that it doesn’t work as well in the testing window. The strategy seems to be performing quite well there. On the left hand side, you can see the results within the training sample period. Once the process has finished, switch to the simulation tab to see how well it performs. This may take a moment, depending on how many bars you have imported for all the symbols. Click on the Train/Test button and let it run the backtests. The next step is to train and test the strategy. The logistic regression then combines both predictions and creates a signal for a 90 minute trade. It creates two predictions, one for 120 minute price movements and one for 60 minute price movements. But instead of setting the prediction time (shift) to 120, set it to 60 minutes. Now change the second Bar Price node (which is an input to the combine node feeding the logistic regression) to a NNet as well and repeat the process. So this first neural network predicts the bar price based on both the indicator sets (DE30EUR and US30USD) for the next 120 minutes. As an input to this NNet node we will again chose a combine node that combines both the indicators for the German top 30 and the indicators for the US top 30.

Set the first one to predict the price movement in the next 120 minutes (set the shift parameter to 120). You now can change both of these new Bar Price nodes to NNet nodes that will hold the artificial neural networks. So change the Indicators node from the original template to a Combine node. To combine the outputs of two nodes, we use the Combine node type. The inputs to the logistic regression node are going to be the combined signals from two NNet nodes. This will make the strategy use the prediction to forecast price changes 90 minutes into the future. So change the Linear regression node from the strategy template to a logistic regression node. Also make sure to change the trade hours of the strategy to when the market for the relevant instruments are actually open (for me this is 9:00 am to 5:00 pm).įor the strategy we will combine the predictions from two artificial neural networks by using a logistic regression node. Once you’ve imported the three instruments into Algominr you can create a new strategy and set its name. top 30 stocks (US30USD) on the euro US dollar exchange rate (EURUSD). We are going to use two artificial neural networks to predict the relationship between the German largest 30 stocks (DE30EUR) and the u.s. Let’s create a more sophisticated strategy now.
