Skip to content
Sign upLog in

Interface with stock price data feed JP Morgan Chase Module 1

Profile icon

Hello everyone, i'm a java developer who is trying to solve a python challenge from JP Morgan. I'm stuck in module 1 trying to update this method. Please if you're familiar with this project, please how do i update this method ? Thanks for your help in advance.

def getDataPoint(quote):

stock = quote[stock]
bid_price = float(quote['top_bid']['price'])
ask_price = float(quote['top_ask']['price'])
price = bid_price
return stock, bid_price, ask_price, stock

You are viewing a single comment. View All
Profile icon


This is the task - (Task starts here) -> A trader would like to be able to monitor two historically correlated stocks and be able to visualize when the correlation between the two weakens (i.e. one stock moves proportionally more than the historical correlation would imply). This could indicate a potential trade strategy to simultaneously buy the relatively underperforming stock and sell the relatively outperforming stock. Assuming the two prices subsequently converge, the trade should be profitable <- (Task ends here)
This method def getDataPoint(quote) is to "Produce all of the needed values to generate a datapoint" and i am to update this function.
I'm getting data feed from JP Morgan server but am stuck on how to update this method. Thanks for any help.