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

Utils or No Utils? #15

Open
maxholloway opened this issue Jul 1, 2020 · 1 comment
Open

Utils or No Utils? #15

maxholloway opened this issue Jul 1, 2020 · 1 comment
Labels
discussion julia? p4 Low Priority (priority 4) wontfix This will not be worked on

Comments

@maxholloway
Copy link
Owner

To Utils or Not to Utils?

Background

In the first making of this package, there was a Utils module that was intended to house common high-level behavior (such as cross-over events between two different fields). This module sat on top of the main Backtest module. Now we are stuck at a crossroads: do we include high-level functionality in our Backtest API ("Pro-Utils"), or do we split this into another project ("Anti-Utils")?

Pro-Utils

  1. I have a strong disposition towards 1-stop-shops. If I create another package, then this will require users to keep track of two separate packages. That thought makes me cringe.
  2. It would be easy enough to just add another sub-module to the Backtest module called Utils, which would depend on the types from the Backtest main module. This would be easy-enough for users to work with.
  3. It would be easier to develop Utils in the same package, probably for multiple reasons. One reason is that we currently don't know the Utils interface. So what happens if we want to add a feature to Utils, but this feature requires access to a low-level data-member in Engine? While this is unlikely, it's not impossible, and this problem would be really cumbersome if we split up the packages. We'd need to first modify the Backtest.jl API to give access to the Engine member, meaning that the tail (Utils) was wagging the dog (Backtest.jl). After this API change, we'd need to update our Backtest.jl version in Utils, then hope that the new API fix was adequate. This process would repeat any time we make low-level calls. Not great!

Anti-Utils

  1. Backtest has already become bloated compared to some other Julia packages. It may be a better idea to stop adding stuff to this package, and instead break off a high level wrapper that has Backtest.jl as a dependency.
  2. Eventually Utils could provide a nice layer between the low-level backtesting that takes place in Backtest.jl and the high-level experimentation that Backtest.jl would be used for.
  3. It may be difficult to develop on Backtest.jl as it becomes larger and larger. If we do create a Utils submodule, the Backtest.jl file will become even larger. Perhaps a big file of code isn't a big deal? Personally I don't mind it that much, so long as my editor has code collapsing.

Current Conclusion

There are a lot of questions around architecture (see #14). For now, since there is so little decisiveness on what is the best move, it may be best to just not develop the Utils code as a part of Backtest.jl, and then decide later. For the near-future, most of my dev time will go toward Backtest.jl (including its API), so more details are to come on this.

@maxholloway maxholloway added julia? p4 Low Priority (priority 4) question Further information is requested wontfix This will not be worked on labels Jul 3, 2020
@maxholloway
Copy link
Owner Author

Decided to add Utils for now; see issue #17 and PR #18.

@maxholloway maxholloway added discussion and removed question Further information is requested labels Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion julia? p4 Low Priority (priority 4) wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant