Challenge: Automated Market Impact Report
Tehtävä
Swipe to start coding
Automate the process of generating a simple market impact report for a given stock symbol using real financial data.
- Complete the
market_impact_report(symbol)function. - Use the provided
fetch_market_data(symbol)function to retrieve the last 5 business days of closing prices and volume for the given stock symbol. - Calculate the following metrics from the data:
- The average closing price over the period;
- The total trading volume over the period;
- The maximum closing price over the period.
- Return a dictionary with keys
'average_close','total_volume', and'max_close', with their corresponding computed values. - Do not modify the
fetch_market_datafunction.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 4
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Suggested prompts:
Can you explain that in simpler terms?
What are the main benefits of this approach?
Are there any common mistakes to avoid with this?
Mahtavaa!
Completion arvosana parantunut arvoon 7.14
Challenge: Automated Market Impact Report
Pyyhkäise näyttääksesi valikon
Tehtävä
Swipe to start coding
Automate the process of generating a simple market impact report for a given stock symbol using real financial data.
- Complete the
market_impact_report(symbol)function. - Use the provided
fetch_market_data(symbol)function to retrieve the last 5 business days of closing prices and volume for the given stock symbol. - Calculate the following metrics from the data:
- The average closing price over the period;
- The total trading volume over the period;
- The maximum closing price over the period.
- Return a dictionary with keys
'average_close','total_volume', and'max_close', with their corresponding computed values. - Do not modify the
fetch_market_datafunction.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 4
single