Stock broker's challenge

0

0 votes
Easy
Problem

XYZ corp” is a new start-up which recently got listed on National Stock Exchange (NSE) of India.

NSE keeps record of each and every exchange of stocks that happened between Buyer and seller, each such record has following parameters:

  1. nSerialNumber – Serial number of record
  2. Timestamp – Time at which transaction of has occurred in NSE
  3. sSymbol – Name of the stock exchanged
  4. nBestBuyOrderPrice – Price buyers willing to pay per stock/per share
  5. nBestBuyOrderQuantity – Total quantity of shares/stocks buyer willing to buy
  6. nBestSellOrderPrice – Price at which sellers are willing to sell a unit stock/share
  7. nBestSellOrderQuantity – Total quantity of shares seller willing to sell
  8. nLastTradedPrice – Actual price at which a single stock/share was exchanged between buyer and seller
  9. nTotalTradedQuantity – Total amount of stock exchanged between seller and buyer

Now, in a particular record, let B_price be nBestBuyOrderPrice and S_price be nBestSellOrderPrice. For given data, there are 2 cases possible:

  • Case 1 : When B_price < S_price -
    When seller wants to sell share at higher price than buyer willing to pay. In this case, buyer and seller meet and agree upon a price, say ‘C_price’, at which shares could be sold and bought at that moment. So here ‘C_price’ would be nLastTradedPrice.

  • Case 2: When B_price >= S_price -
    When buyer is offering equal or more price than seller’s expectations. In this case transaction will be done with ‘S_price’ i.e. S_price is now nLastTradedPrice.

Since XYZ is one of the highly exchanged stocks in market, a NSE broker wants to determine real-time predictions on “nLastTradedPrice” at which stock exchange happens. In this challenge, you have to help broker to predict values of “nLastTradedPrice” from file “TestData.csv” based on relevant time-series analysis.

Dataset : Link

Contains following files :

  • TestData.csv : Data for predictions
  • TrainData.csv : Data for training
  • SampleOutput.csv : Sample output file

Submission :

A participant has to submit a csv file with predicted values of ‘nLastTradedPrice’ for every record/transaction present in TestData.csv. Check the sample submission file in Data-set for reference.

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?