What it does
makeMoney buys an amount of stock and sells it for a higher price.
buyAndSellToBasket buys stock from Amazon and Google. It then sells Tech Basket stock when the buy price of Amazon and Google combined is lower than Tech Basket. After that, it will buy back the shorted stocks of Tech Basket and sell the Amazon and Google stocks whenever the price of Amazon and Google combined is higher thsn Tech Basket.
Both functions can have the volume of stock they buy and sell as well as the profit margin modified.
How we built it
We first tested out buying and selling. We then upped the volume which led to makeMoney being created. It never sells more than it buys so that it does no have to short as much.
buyAndSellToBasket was created in an attempt to replicate what was shown to us on the presentation slides.
Challenges we ran into
We found that if the program finished before our orders were done, those orders would not go through. We therefore implemented a waiting function that only stopped looping once the orders had finished. This gave us the problem that it could take a very long time for each iteration of the program if we could not buy or sell quickly due to the fluctuations in the market. However, both functions did operate on a profit if they executed completely.
Accomplishments that we're proud of
When the program was being tested, our team fell into 4k of debt. It was a surprise that we climbed out of it! We are happy that our program only loses values if the market drops for a long time.
What we learned
We have learnt the basics of hedging but did not use it when presenting it after the test phase as the errors in it were not ironed out.
Risks
makeMoney's only risk is that the market will go down too much from the buying point that it will never sell. Leading to a loss where you need to sell it manually at a lower price. That is why Tech Basket was used to test and to present as it does not fluctuate as fast. However, if the market rises rapidly then it is sure to make money. Along with this, the function utilises a variable that determines profit. If the market you are buying in is less likely to rise and fall drastically, you can set the profit function to be less which will decrease the selling prices of makeMoney and buyAndSellToBasket.
buyAndSellToBasket takes more risks as it both sells and buys at the same time. Hence if it is interrupted it may result in a loss as it could still have shorts or stocks to sell or buy. It does utilise more markets to avoid too many loses.
Built With
- cloud9
Log in or sign up for Devpost to join the conversation.