Browse Source

fix formulation

pull/42/head
brad-gh 2 years ago committed by GitHub
parent
commit
4cbd2c85ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      piscine/week01/day05/ex02/audit/README.md

12
piscine/week01/day05/ex02/audit/README.md

@ -1,12 +1,12 @@
##### The exercice is validated is all questions of the exercice are validated
###### Have you checked missing values and data types ?
###### Have you converted string dates to datetime ?
###### Have you set dates as index ?
###### Have you used `info` or `describe` to have a first look at the data ?
###### Have the missing values and data types been checked ?
###### Have the string dates been converted to datetime type ?
###### Have the dates been set as index ?
###### Have `info` or/and `describe` been used to have a first look at the data ?
##### The question 1 is validated if you inserted the right columns in `Candlestick` `Plotly` object. The Candlestick is based on Open, High, Low and Close columns. The index is Date (datetime).
##### The question 1 is validated if the right columns are inserted in `Candlestick` `Plotly` object. The Candlestick is based on Open, High, Low and Close columns. The index is Date (datetime).
##### This question 2 is validated if the output of `print(transformed_df.head().to_markdown())` is as below and if there are **482 months**.
@ -24,7 +24,7 @@ To get this result there are two ways: `resample` and `groupby`. There are two k
- Choose the right aggregation function for each variable. The prices (Open, Close and Adjusted Close) should be aggregated by taking the `mean`. Low should be aggregated by taking the `minimum` because it represents the lower price of the day, so the lowest price on the month is the lowest price of the lowest prices on the day. The same logic applied to High, leads to use the `maximum` to aggregate the High. Volume should be aggregated using the `sum` because the monthly volume is equal to the sum of daily volume over the month.
##### The question 3 is validated if it doesn't involve a for loop and the output is as below. The first way to do it is to compute the return without for loop is to use `pct_change`. And the second way to do it is to implement the formula given in the exercise in a vectorized way. To get the value at `t-1` you can use `shift`.
##### The question 3 is validated if it doesn't involve a for loop and the output is as below. The first way to do it is to compute the return without for loop is to use `pct_change`. And the second way to do it is to implement the formula given in the exercise in a vectorized way. To get the value at `t-1` the data has to be shifted with `shift`.
```console
Date

Loading…
Cancel
Save