What we have to do here is create market simulation program.
Question: how to make highest net benefit?
Buy at 90
Sell at 200
Buy at 90
Sell at 200
Net Value 110
Sell at 200
Buy at 90
Net Value is 110
We should ban toyota!!!
Based on above data, there are several scenarios we can think.
First market price is 90
Then lets buy the stock.
1qty at 90
Buy | Sell |
---|
Now market price is 100.
1qty at 90
Buy | Sell |
---|
But since we know there is more higher value is coming, we skip it.
1qty at 90
Buy | Sell |
---|
Now market price is 200.
1qty at 90
Buy | Sell |
---|
Lets sell it.
1qty at 90
Buy | Sell |
---|
You made 110 net value.
1qty at 90
Buy | Sell |
---|
200 - 90 = 110
At market price 40, we dont do anything.
1qty at 90
Buy | Sell |
---|
200 - 90 = 110
Or,,,
1qty at 90
Buy | Sell |
---|
200 - 90 = 110
Or,,,you can buy 90... and ...
1qty at 90
Buy | Sell |
---|
Sell at 100
1qty at 90
Buy | Sell |
---|
100 - 90 = 10
And sell at 200
1qty at 200
Buy | Sell |
---|
Net value 10
And buy at 40
1qty at 40
Buy | Sell |
---|
Net value 10
200 - 40 = 160
Total is 170...
1qty at 40
Buy | Sell |
---|
Net value 10
200 - 40 = 160
160 + 10 = 170
In this case, 170 are bigger. So then this answer is 170.
1qty at 40
Buy | Sell |
---|
Net value 10
200 - 40 = 160
160 + 10 = 170
Always 1qty at a time.
Always 1qty at a time.
You have unlimited money.
Always 1qty at a time.
You have unlimited money.
One Time One Action
(Buy, Sell or stay)
Always 1qty at a time.
You have unlimited money.
One Time One Action
(Buy, Sell or stay)
First In First Out