---
title: "Zipline"
description: "Learn how to migrate trading algorithms from Zipline to LEAN."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/99%20Migrations/01%20Zipline
modified: 2026-10-28
index: https://www.quantconnect.com/llms.txt
---

# Zipline

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Migrations > Zipline

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

The following pages explain how to migrate trading algorithms from Zipline to LEAN:

- [Initialization](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/initialization.md)
- [Using Data](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/using-data.md)
- [Ordering](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/ordering.md)
- [Logging and Plotting](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/logging-and-plotting.md)
- [Quick Reference](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/quick-reference.md)

## Pages in This Section

- [Initialization](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/initialization.md): The algorithm structure in QuantConnect differs from Quantopian. On QuantConnect, we create a class that derives from QCAlgorithm.
- [Using Data](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/using-data.md): Pipelines can be replicated using Universe Selection in QuantConnect, albeit with some additional steps in between and a performance impact.
- [Ordering](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/ordering.md): Both Quantopian and QuantConnect offer several methods for placing orders. Both platforms have market, limit, stop, and stop limit orders.
- [Logging and Plotting](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/logging-and-plotting.md): In QuantConnect, the self.Debug() method is the equivalent of the log.info() function in Quantopian.
- [Quick Reference](https://www.quantconnect.com/docs/v2/writing-algorithms/migrations/zipline/quick-reference.md): Summary of the difference between QuantConnect and Quantopian methods.
