Random Forest as best approach to this problem?
I am studying ML and want to practice building a model to predict stock market returns for the next day, for example based on price and volume of the preceding days.
The current values I have for each day:
M = [[Price at day-1, price at day 0, return at day+1]
[Volume at day-1, volume at day 0, return at day+1]]
I would like to find rules, that define the ranges of price at day-1 and price at day 0 to predict the price at day+1 in the following way:
If price is below 500 for day-1 AND price is above 200 at day 0
The average return at day+1 is 1.05 (5%)
or
If price is below 500 for day-1 AND price is above 200 at day 0
AND If volume is above 200 for day-1 AND volume is below 800 at day 0
The average return at day+1 is 1.09 (9%)
I am not looking for any solutions but just for the general strategy how to approach this problem.
Is ML useful here at all, or would it be better done using a for loop iterating through all values to find the rules? I am considering random forest, would that be a viable option?
machine-learning regression random-forest
add a comment |
I am studying ML and want to practice building a model to predict stock market returns for the next day, for example based on price and volume of the preceding days.
The current values I have for each day:
M = [[Price at day-1, price at day 0, return at day+1]
[Volume at day-1, volume at day 0, return at day+1]]
I would like to find rules, that define the ranges of price at day-1 and price at day 0 to predict the price at day+1 in the following way:
If price is below 500 for day-1 AND price is above 200 at day 0
The average return at day+1 is 1.05 (5%)
or
If price is below 500 for day-1 AND price is above 200 at day 0
AND If volume is above 200 for day-1 AND volume is below 800 at day 0
The average return at day+1 is 1.09 (9%)
I am not looking for any solutions but just for the general strategy how to approach this problem.
Is ML useful here at all, or would it be better done using a for loop iterating through all values to find the rules? I am considering random forest, would that be a viable option?
machine-learning regression random-forest
I would say stats.stackexchange.com is a better option to make your particular question.
– Franco Piccolo
Nov 18 '18 at 6:52
add a comment |
I am studying ML and want to practice building a model to predict stock market returns for the next day, for example based on price and volume of the preceding days.
The current values I have for each day:
M = [[Price at day-1, price at day 0, return at day+1]
[Volume at day-1, volume at day 0, return at day+1]]
I would like to find rules, that define the ranges of price at day-1 and price at day 0 to predict the price at day+1 in the following way:
If price is below 500 for day-1 AND price is above 200 at day 0
The average return at day+1 is 1.05 (5%)
or
If price is below 500 for day-1 AND price is above 200 at day 0
AND If volume is above 200 for day-1 AND volume is below 800 at day 0
The average return at day+1 is 1.09 (9%)
I am not looking for any solutions but just for the general strategy how to approach this problem.
Is ML useful here at all, or would it be better done using a for loop iterating through all values to find the rules? I am considering random forest, would that be a viable option?
machine-learning regression random-forest
I am studying ML and want to practice building a model to predict stock market returns for the next day, for example based on price and volume of the preceding days.
The current values I have for each day:
M = [[Price at day-1, price at day 0, return at day+1]
[Volume at day-1, volume at day 0, return at day+1]]
I would like to find rules, that define the ranges of price at day-1 and price at day 0 to predict the price at day+1 in the following way:
If price is below 500 for day-1 AND price is above 200 at day 0
The average return at day+1 is 1.05 (5%)
or
If price is below 500 for day-1 AND price is above 200 at day 0
AND If volume is above 200 for day-1 AND volume is below 800 at day 0
The average return at day+1 is 1.09 (9%)
I am not looking for any solutions but just for the general strategy how to approach this problem.
Is ML useful here at all, or would it be better done using a for loop iterating through all values to find the rules? I am considering random forest, would that be a viable option?
machine-learning regression random-forest
machine-learning regression random-forest
edited Nov 18 '18 at 8:17
Anony-Mousse
57.6k796159
57.6k796159
asked Nov 18 '18 at 5:47
Franc WeserFranc Weser
16417
16417
I would say stats.stackexchange.com is a better option to make your particular question.
– Franco Piccolo
Nov 18 '18 at 6:52
add a comment |
I would say stats.stackexchange.com is a better option to make your particular question.
– Franco Piccolo
Nov 18 '18 at 6:52
I would say stats.stackexchange.com is a better option to make your particular question.
– Franco Piccolo
Nov 18 '18 at 6:52
I would say stats.stackexchange.com is a better option to make your particular question.
– Franco Piccolo
Nov 18 '18 at 6:52
add a comment |
1 Answer
1
active
oldest
votes
Yes. Random forests can be used for regression.
They will have a tendency to predict the average though, because of the forest aggregation. Regular decision trees may be a bit more "decisive".
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53358258%2frandom-forest-as-best-approach-to-this-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes. Random forests can be used for regression.
They will have a tendency to predict the average though, because of the forest aggregation. Regular decision trees may be a bit more "decisive".
add a comment |
Yes. Random forests can be used for regression.
They will have a tendency to predict the average though, because of the forest aggregation. Regular decision trees may be a bit more "decisive".
add a comment |
Yes. Random forests can be used for regression.
They will have a tendency to predict the average though, because of the forest aggregation. Regular decision trees may be a bit more "decisive".
Yes. Random forests can be used for regression.
They will have a tendency to predict the average though, because of the forest aggregation. Regular decision trees may be a bit more "decisive".
answered Nov 18 '18 at 8:17
Anony-MousseAnony-Mousse
57.6k796159
57.6k796159
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53358258%2frandom-forest-as-best-approach-to-this-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I would say stats.stackexchange.com is a better option to make your particular question.
– Franco Piccolo
Nov 18 '18 at 6:52