-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit test calculate_vwap()
#782
Comments
@DanilYachmenev Thanks for the issue |
Thanks @samarth9008 for assigning the issue. |
@aish-nidhi feel free to post a plan or do a draft PR (e.g., only a sketch/skeleton, we won't expect any convention to be followed, you just have to mark it as draft and ask for a architectural review). |
Sure. Will be doing the draft PR based on my understanding of the issue.Thanks & Regards,Aishwarya NidhiOn 15 Apr 2024, at 4:21 PM, GP Saggese ***@***.***> wrote:
@aish-nidhi feel free to post a plan or do a draft PR (e.g., only a sketch/skeleton, we won't expect any convention to be followed, you just have to mark it as draft and ask for a architectural review).
The worst case scenario is misinterpreting the specs and come back with something correct but different than was it requested.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@aish-nidhi can you reply on the GUI (the link is in the email) instead of replying to the GH email so that we don't get all the garbage above. |
@gpsaggese Will keep that in mind. |
Hey @DanilYachmenev @samarth9008 , Just had a quick question. I was trying to run my test when I realised that both the files mentioned in the issue are not using the function Below is a jackpy search result output:-
Can you point me to somewhere this function is used? Should I continue with testing? |
@aish-nidhi good note, indeed, So here you need to create a test DataFrame with then just add 2 tests for 2 different Use string signature approach in order to compare outputs. |
Hey @DanilYachmenev @samarth9008, How would you want me to address this issue? Should I convert the "full_symbol" to "np.int64"? The |
Indeed, true. For some reason, functions from Therefore, replace |
* Issue #782 draft PR with code skeleton * Issue #782 unit tests for function calculate_vwap_twap with 2 different resampling rules * Fix for ambiguous truth value of multiindex column names * Linter corrections on file * Changes for PR comment * Modifications to address PR comments * Adding full-stop to comments --------- Co-authored-by: Aishwarya Nidhi <aishwaryanidhi@Aishwaryas-Air.cgocable.net> Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com>
* Issue causify-ai#782 draft PR with code skeleton * Issue causify-ai#782 unit tests for function calculate_vwap_twap with 2 different resampling rules * Fix for ambiguous truth value of multiindex column names * Linter corrections on file * Changes for PR comment * Modifications to address PR comments * Adding full-stop to comments --------- Co-authored-by: Aishwarya Nidhi <aishwaryanidhi@Aishwaryas-Air.cgocable.net> Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com>
* Issue #782 draft PR with code skeleton * Issue #782 unit tests for function calculate_vwap_twap with 2 different resampling rules * Fix for ambiguous truth value of multiindex column names * Linter corrections on file * Changes for PR comment * Modifications to address PR comments * Adding full-stop to comments --------- Co-authored-by: Aishwarya Nidhi <aishwaryanidhi@Aishwaryas-Air.cgocable.net> Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com>
* Revert "Add DATA605 directory (#876)" (#884) This reverts commit 00e90d2. * SorrTask786 Unit test for split_positive_and_negative_parts() (#883) * Added Unit test for split_positive_and_negative_parts() * Resolved comments * Added remaining comments * deleted unnecessary files * "Fixes" * Comment resolution * Comments resolved. --------- Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com> * SorrTask-782 Unit tests for calculate_vwap_twap() (#801) * Issue #782 draft PR with code skeleton * Issue #782 unit tests for function calculate_vwap_twap with 2 different resampling rules * Fix for ambiguous truth value of multiindex column names * Linter corrections on file * Changes for PR comment * Modifications to address PR comments * Adding full-stop to comments --------- Co-authored-by: Aishwarya Nidhi <aishwaryanidhi@Aishwaryas-Air.cgocable.net> Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com> * SorrTask-891 Unit tests for compute epoch function (#901) * Issue 891 - Unit test code skeleton * Issue-891 3 unit tests with each available unit value for Series input. * Issue-891 Unit test of compute epoch function for dataframe input with default unit * Adding missed full stop for comment * PR comment fixes * Removing todo from function * PR comment fixes --------- Co-authored-by: Aishwarya Nidhi <aishwaryanidhi@Aishwaryas-Air.cgocable.net> Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com> * SorTask903 Unit test convert_seconds_to_pandas_minutes() (#907) * Added unit test for function convert_seconds_to_minutes * Nits --------- Co-authored-by: Shaunak Dhande <77265046+Shaunak01@users.noreply.github.com> Co-authored-by: neha2801-create <77967216+neha2801-create@users.noreply.github.com> Co-authored-by: Samarth KaPatel <samarth.kapatel5@gmail.com> Co-authored-by: Aishwarya Nidhi <nidhiaishwarya8@gmail.com> Co-authored-by: Aishwarya Nidhi <aishwaryanidhi@Aishwaryas-Air.cgocable.net>
Not used anymore so closing |
There is a
calculate_vwap()
inim_v2/common/data/transform/transform_utils.py
(link) that is being used inamp/research_amp/cc/notebooks/master_tradability_analysis.py
andamp/research_amp/cc/notebooks/Master_Analysis_CrossSectionalLearning.py
We need to add unit tests using synthetic test data. Create a simple short dataframe with 2 columns: 1 for price and 1 for volume, use a pd.Timestamp index.
Run the function on it and compare the outcome with string signature (for ref see tests in
amp/helpers/test/test_hpandas.py
e.g.Test_merge_dfs1
)Add 2 unit tests:
resample_kwargs
resample_kwargs
See unit test doc to follow the code style
Assigning @samarth9008 to re-distribute
FYI @gpsaggese
The text was updated successfully, but these errors were encountered: