Great work sharing your process! How do you decide when to stick with a simple for loop versus optimizing with Pandas or other libraries?
When a For Loop Powers Your Stock Backtester - Devlog
Suleyman Sade
●2 ●27 ●36
calendar_today
• schedule3 min read
— Originally published at python.plainenglish.io
2 Comments
Suleyman Sade
•
I would normally rather using the optimized Pandas approach almost always, but as I mentioned in the post I stick with a for loop partially because it is easier to read. But the other underlying reason is because I couldn't exactly figure out how I would record day to day price changes with the pre-recording approach. I didn't spend too much time into this since the regular for loop approach worked fast enough.
Please log in to add a comment.
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- Premium Subscription
- Terms of Service
- Refund
- Early Builders
chevron_left
12Posts
14Comments
7Connections
A student passionate about programming and AI who likes to write about these topics.
More From Suleyman Sade
Related Jobs
- Senior Asp.net Web Developer (10+yrs) + PowerSuiteTech Marketing · Full time · Columbus, OH
- DevOps Engineer (C# + Azure DevOps + Powershell)Diverse Lynx · Full time · Bellevue, WA
- Full Stack Java/Go Developer (Bilingual English/Spanish)Dev Technology · Full time · Arlington, VA
Commenters (This Week)
Jairo Fernndez
2 comments
anhmtk
1 comment
devlint
1 comment
Contribute meaningful comments to climb the leaderboard and earn badges!