Skip to content
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

My submission #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

My submission #3

wants to merge 4 commits into from

Conversation

084e0d1c
Copy link

Hi Team,

Here is my submission. Thank you!

Copy link
Member

@Jackal08 Jackal08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Brandon,

This was a good attempt. I can see that you made a lot of effort and did your homework, however you made some mistakes in your implementation and some of your design choices highlight inexperience.

That is alright, considering that most of our researchers already have a masters degree. If you keep this spirit up, I think you will do well in your career.

We will setup an interview.

  • Good writeup!
  • Reviewing previous candidates' reviews paid off big time!
  • Nice code style
  • Good use of hidden and public methods
  • Wrong implementation
  • Good inline comments and docstrings
  • Added req file
  • Good design ideas
  • Some bad design choices
  • Would benefit by adding a linter.
  • Cool that you added web scraping
  • Would have been nice to see at least 1 unit test.

@@ -0,0 +1,52 @@
appnope==0.1.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that you added a requirements file but you have added way too many dependencies here. Are you really using all of these libraries in your code?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Jacques.

I used a virtual environment and installed the relevant packages. Did not remove some as I was not sure if they had dependencies. Will take note in the future!

@@ -0,0 +1,483 @@
import pandas as pd
import numpy as np

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please tidy up your imports and use the correct import order.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!


class PartnerSelector:
"""
Implementation of the Partner Selection Framework.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This docstring might be better for a module docstring. Your class docstring should relate to what that class does. I would move the H&T skillset challenge to the module docstring.

Nice that you added a link to the paper, but you should also have added the name of the paper.

https://www.econstor.eu/bitstream/10419/147450/1/870932616.pdf
"""

def __init__(self, price_data: pd.DataFrame, target_ticker: str, no_of_partners: int = 3, top_n_corr: int = 50):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good that you added hard typing.

:param price_data: Consumes a price dataframe provided by the user. Index by datetime and columns are tickers. Implicitly, the columns will define the universe that the partners will be found in.
:type price_data: pd.DataFrame
:param target_ticker: The target ticker that the user would like to create the grouping around.
:type price_data: str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not seen this style of docstring before. Are you sure this will render in Sphinx? `:type:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used the VSC extension by Nils Werner - "Python Docstring Generator" and set the settings to Sphinx. Let me check on this again.

Screenshot 2021-02-19 at 9 15 21 PM


def get_index_ticker(index: str):
"""
Function to scrape existing index members from CNN website.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool idea.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!


for i in tqdm(range(len(self.all_possible_partners))):

# Converting to list as itertools combination generates an itertools object.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing a lot of duplicate code here. As noted in your write-up, this should be more modular.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never have duplicate code.


def plot_selected_partners(self):
"""
Plots the historical log prices of the best partners that was identified
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the write up you mention that you are not sure what some good visualizations would be. It would be good to show visually, how the various techniques extract different properties from the data. Something to highlight the differences, which technique is better, something along those lines.

@@ -0,0 +1,436 @@
{
"metadata": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The notebook is good but would benefit from a body section that describes the various techniques.

{
"metadata": {
"language_info": {
"codemirror_mode": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit sparse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants