Skip to content

Compute Sortino ratio (#67) - #108

Merged
PietropaoloFrisoni merged 33 commits into
masterfrom
feature/sortino-ratio
Aug 2, 2023
Merged

PietropaoloFrisoni merged 33 commits into
masterfrom
feature/sortino-ratio

Conversation

@fmilthaler

Copy link
Copy Markdown
Owner

Addition of Sortino ratio to FinQuant

@fmilthaler
fmilthaler force-pushed the feature/sortino-ratio branch from dd62507 to 694d67c Compare July 18, 2023 16:34
@fmilthaler
fmilthaler marked this pull request as draft July 18, 2023 16:42
@fmilthaler fmilthaler self-assigned this Jul 24, 2023
@fmilthaler
fmilthaler force-pushed the feature/sortino-ratio branch from 694d67c to bcbd442 Compare July 26, 2023 09:04
@PietropaoloFrisoni

Copy link
Copy Markdown
Collaborator

Amazing, I didn't realize that so much work was already done to add the Sortino Ratio to FinQuant. Thank you so much for your work @aft90 and @fmilthaler! I will happily go into the details and complete the feature implementation as soon as possible.

Sorry to bother you @fmilthaler, but it looks like some checks (build 3.11) were not successful. I tried to resolve some conflicts which appeared after pulling and pushing an empty commit as a test, and I hope I haven't done any damage : ). Do you have any idea how to solve these?

All the best

@PietropaoloFrisoni

PietropaoloFrisoni commented Jul 26, 2023 •

Copy link
Copy Markdown
Collaborator

@fmilthaler Ok, it is all fixed now.

@fmilthaler

Copy link
Copy Markdown
Owner Author

Amazing, I didn't realize that so much work was already done to add the Sortino Ratio to FinQuant. Thank you so much for your work @aft90 and @fmilthaler! I will happily go into the details and complete the feature implementation as soon as possible.

Sorry to bother you @fmilthaler, but it looks like some checks (build 3.11) were not successful. I tried to resolve some conflicts which appeared after pulling and pushing an empty commit as a test, and I hope I haven't done any damage : ). Do you have any idea how to solve these?

All the best

Sorry, I couldn't check it out yesterday, but seems like you got it solved now. Well done :)

@fmilthaler

Copy link
Copy Markdown
Owner Author

@PietropaoloFrisoni Apologies for not telling you about this.
I saw that you updated README.tex.md manually, and then your changes were overwritten by the automated script. You should not update the README.tex.md. The actual readme of the project is README.md. When you make changes in there, they are automatically ported over to README.tex.md (just to keep that file up to date). By now it is somewhat of an redundant version, which was initially used to get the LaTeX equations into README.md.

Anyways, make your changes in README.md, not README.tex.md :)

@PietropaoloFrisoni

Copy link
Copy Markdown
Collaborator

Thank you, Frank. I was actually going to ask you what was going on XD.

Before next week I'll most probably complete this PR (I would like to perform some sanity checks on the Sortino Ratio with other sources first).

All the best

@PietropaoloFrisoni
PietropaoloFrisoni marked this pull request as ready for review August 1, 2023 08:25
@PietropaoloFrisoni

PietropaoloFrisoni commented Aug 1, 2023 •

Copy link
Copy Markdown
Collaborator

Ultimately, I implemented the Sortino ratio described in this document.

Different documents and tutorials seem to implement slightly different versions of the Sortino ratio. Performing the same test with the portfolio described in this example using FinQuant delivers the same result of PerformanceAnalytics R package, which provides a function to compute the Sortino ratio. (There is a slight difference since the example considers Close Price instead of the Adjusted Close Price, but using the same format gives precisely the same output).

@fmilthaler Please let me know if you like the current order in which the portfolio parameters are displayed or if there is anything you want to add/remove/change : )

All the best

@fmilthaler

Copy link
Copy Markdown
Owner Author

Excellent, I'll take a more detailled look at it tomorrow.
Could you please add this to one of the examples? I guess Example-Analysis would be the best place?!

@PietropaoloFrisoni

Copy link
Copy Markdown
Collaborator

Excellent, I'll take a more detailled look at it tomorrow. Could you please add this to one of the examples? I guess Example-Analysis would be the best place?

Yep, I keep forgetting about updating the examples. I'll add it tomorrow 👍

Comment thread finquant/portfolio.py
@fmilthaler

Copy link
Copy Markdown
Owner Author

Other than the docstring comment (which you actually did correctly, strictly speaking), this looks good to me. Will approve and merge as soon as the comment is re-added.

@fmilthaler

Copy link
Copy Markdown
Owner Author

One additional request: Could you add this line to CONTRIBUTORS.md:

- @aft90: helped to implement the Sortino Ratio

@fmilthaler fmilthaler left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

As mentioned in the comments with more details:

  1. please revert the change of removing part of the docstring, and
  2. update the list of contributors

@fmilthaler fmilthaler left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Since I was part of this PR, I cannot formally approve, but unofficial I do. Ready to be merged.

@PietropaoloFrisoni
PietropaoloFrisoni merged commit a2d01de into master Aug 2, 2023
@PietropaoloFrisoni
PietropaoloFrisoni deleted the feature/sortino-ratio branch August 2, 2023 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants