From 4cbd2c85ee65519aa6038059fc57bca11b40ebb9 Mon Sep 17 00:00:00 2001 From: brad-gh <32170926+brad-gh@users.noreply.github.com> Date: Tue, 26 Apr 2022 23:08:12 -0400 Subject: [PATCH] fix formulation --- piscine/week01/day05/ex02/audit/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/piscine/week01/day05/ex02/audit/README.md b/piscine/week01/day05/ex02/audit/README.md index 0e48db3..0e95525 100644 --- a/piscine/week01/day05/ex02/audit/README.md +++ b/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