Python - Project with well-written code - Example for study?

Zipline is difficult to modify and also the data management is very complicated. But I find the code very well written (Python only). Why do you think it is bad?

Well you gave the example yourself: zipline is difficult to modify. If code is difficult to modify, that's a strike against it. I've never met a "good" codebase that is difficult to modify. You should be able to sexually abuse good code and have it remain as pure as a virgin.
 
It's a great list, but it's a list of useful libraries. What the OP needs is something they can learn from. That probably means a project needs to be relatively small and tractable, and it must have readable, well written code. Whether the project is useful or not isn't that relevant.

GAT
The second item in the list.

Algorithms and Design patterns
https://github.com/vinta/awesome-python#algorithms-and-design-patterns

Also, look at any of the repos put out by top tier tech companies as they will typically be quality.
 
Well you gave the example yourself: zipline is difficult to modify. If code is difficult to modify, that's a strike against it. I've never met a "good" codebase that is difficult to modify. You should be able to sexually abuse good code and have it remain as pure as a virgin.

It's difficult for me because it isn't pure python but they had to make tradeoffs for performance
 
It's difficult for me because it isn't pure python but they had to make tradeoffs for performance

I'm sure they measured the performance in order to decide what they should do but lots of bad code has been written in the name of premature optimization. What changes did they make and why?
 
https://github.com/mementum/backtrader#alternatives

 
Another way to get better is via code review. If you know someone that can review your code (github code review is ok but not great) that will really help too.
 
xappppp, I've been doing Python for a while now.

Extra modules like Zipline and the like take a while to figure out. My daily data vendor (Norgate) has figured out how to adapt code Clenow's book against its data, which is a task I'm thankful I didn't have to do myself.

Zipline is authored by Quantopian, but you need to really delve through their community forum to get anything approaching "extensive".

Maybe you could tell us what you're trying to achieve, what periodicity you use (or want to use) and we could let you know which Python module(s) might work?
 
Back
Top