Challenge: Automated Market Impact Report
Oppgave
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.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 4
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Fantastisk!
Completion rate forbedret til 7.14
Challenge: Automated Market Impact Report
Sveip for å vise menyen
Oppgave
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.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 4
single