Stock Market

Stock Market

3k Downloads

Treasury Bonds Feature?

Jack3161280 opened this issue ยท 6 comments

commented

I know this mod focuses solely on stock market but would it be possible to implement a treasury bond feature that can be bought and held for 10 or 20 ingame days at different price tiers ($10, $100, $1000)? With each ingame day the bond is held in the bank system for, interest is added to the account. However, I do not know how complex it would be to implement keeping track of a bond's lifespan and allowing for different bond yield %'s.

commented

To further this feature, it would be interesting to have a system that automatically generates new bonds and possibly include an auction with bots to contend with to buy these bonds or other items.

commented

hey i will work on this by forking it, ill try to add bonds market! maybe even futures and options

commented

alright got it thank you for your reply!
Ill surely get back to you if i find anything i need help with.
Thank you. :D

commented

@KapishYadavv
This is possible, but keep in mind that the mods are currently in a state where many changes are being made.
I don't have time right now to work on them and complete the major changes.
I'll have time again in December.
So if you add/change code, please keep in mind that I can't guarantee that your changes will remain compatible with the planned changes.

commented

@KROIA i just have a question, how did you make the price move by bots? for example: when i made a orderbook and added liquidity bots (HFTs in real world) the price always gets stuck in a upper and lower range so how come did you make the price so its always volatile?

commented

You have to follow the rule of a market, that means if you want to change the price you have to create a transaction (buy/sell- limit/market) Order. The bots can create "bot"-orders which are not bound to a bank account, which means the bot has an infinite amount of liquidity.
You: "price always gets stuck in a upper and lower range". Do you mean that the price jumps up and down, creating an larger and larger spread?
If yes, that means that you started with some initial liquidity in the orderbook but never added fresh liquidity to it.
In order to hold the spread small, you have to add new liquidity to the ghost order book.
I hope you can understand that, if not, feel free to ask again.

Key notes for creating a price movement:

  1. provide liquidity to the orderbook. That can be done by creating limit orders or by adding some amount to the ghost order book (recommended for bot stuff).
    Limit orders take more performance than the ghost orderbook.
  2. Create bot orders: Buy order to move the price up, Sell orders to move the price down.
    The volume of the order, determens the speed for which the price changes.
    The spreed in price change is also dependant on the liquidity in the orderbook that needs to be consumed by the order.