Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Simulate and Visualize Portfolio Diversification | Investment Metrics and Portfolio Analysis
Python for Investors

bookChallenge: Simulate and Visualize Portfolio Diversification

Tarefa

Swipe to start coding

You are given simulated daily returns for three assets over a year. Your task is to simulate a diversified portfolio using these assets, compute relevant diversification metrics, and visualize the results.

  • Calculate the daily portfolio returns as a weighted sum of the individual asset returns using the provided weights.
  • Compute the mean and standard deviation of the simulated portfolio returns.
  • Plot a histogram of the daily portfolio returns and display the plot.
  • Do not change the provided random seed, asset returns, or portfolio weights.
  • Use only the allowed libraries for your calculations and visualization.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 7
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Simulate and Visualize Portfolio Diversification

Deslize para mostrar o menu

Tarefa

Swipe to start coding

You are given simulated daily returns for three assets over a year. Your task is to simulate a diversified portfolio using these assets, compute relevant diversification metrics, and visualize the results.

  • Calculate the daily portfolio returns as a weighted sum of the individual asset returns using the provided weights.
  • Compute the mean and standard deviation of the simulated portfolio returns.
  • Plot a histogram of the daily portfolio returns and display the plot.
  • Do not change the provided random seed, asset returns, or portfolio weights.
  • Use only the allowed libraries for your calculations and visualization.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 7
single

single

some-alt