Skip to content

Commit

Permalink
Merge pull request #339 from Lumiwealth/dev
Browse files Browse the repository at this point in the history
Update master
  • Loading branch information
grzesir authored Dec 24, 2023
2 parents 87b2a0e + bf9b849 commit 2742c49
Show file tree
Hide file tree
Showing 452 changed files with 2,823 additions and 1,214 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ test_bot.py
.vscode
.coverage*
*secret*/**.env
lumi_tradier

# Pypi deployment
build
dist
lumibot.egg-info
setup.py
*.egg-info
# setup.py
/alpaca_data_run.py
/alpaca_run.py
/lumibot_profiles.png
Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 52422e79752ce83df7742446c340d415
config: 0ac5d3c04124e416ff496209e349ab43
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 2 additions & 0 deletions docs/_sources/backtesting.pandas.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Pandas (CSV or other data)
===================================

**Note: For most situations, you will want to use the Polygon backtester or the Yahoo backtester instead, they are much easier to use and get started with. The Pandas backtester is intended for advanced users who have their own data and want to use it with Lumibot.**

Pandas backtester is named after the python dataframe library because the user must provide a strictly formatted dataframe. You can have any csv or parquet or database data you wish, but Lumibot will only accept one format of dataframe for the time being.

Pandas backtester allows for intra-day and inter-day backtesting. Time frames for raw data are 1 minute and 1 day. Resampling of time frames is not yet available.
Expand Down
2 changes: 2 additions & 0 deletions docs/_sources/backtesting.polygon.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Finally, run the backtest:
datetime_start=backtesting_start,
datetime_end=backtesting_end,
api_key="YOUR_POLYGON_API_KEY",
has_paid_subscription=False, # Set this to True if you have a paid subscription to polygon.io (False assumes you are using the free tier)
)
broker = BacktestingBroker(data_source)
crypto_strat = CryptoEMACross(
Expand Down Expand Up @@ -86,6 +87,7 @@ Here's another example but for for stocks:
datetime_start=backtesting_start,
datetime_end=backtesting_end,
api_key="YOUR_POLYGON_API_KEY",
has_paid_subscription=False, # Set this to True if you have a paid subscription to polygon.io (False assumes you are using the free tier)
)
broker = BacktestingBroker(data_source)
my_strat = MyStrategy(
Expand Down
5 changes: 4 additions & 1 deletion docs/_sources/backtesting.rst.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Backtesting
************************

Lumibot has two modes for backtesting.
Lumibot has three modes for backtesting.

#. Yahoo Backtesting: Daily stock backtesting with data from Yahoo.
#. Pandas Backtesting: Intra-day and inter-day testing of stocks and futures using CSV data supplied by you.
#. Polygon Backtesting: Intra-day and inter-day testing of stocks and futures using Polygon data from polygon.io

It is recommended to use the Yahoo Backtesting for daily stock backtesting, or Polygon Backtesting for intra-day and inter-day testing of stocks, options, crypto and FOREX. Pandas Backtesting is an advanced feature that allows you to test any type of data you have in CSV format but requires more work to setup and is not recommended for most users.

.. toctree::
:maxdepth: 2
Expand Down
14 changes: 13 additions & 1 deletion docs/_sources/brokers.alpaca.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,16 @@ Documentation
.. automodule:: lumibot.brokers.alpaca
:members:
:undoc-members:
:show-inheritance:
:show-inheritance:

.. automethod:: lumibot.brokers.alpaca.Alpaca.get_time_to_close
:no-index:

.. automethod:: lumibot.brokers.alpaca.Alpaca.get_time_to_open
:no-index:

.. automethod:: lumibot.brokers.alpaca.Alpaca.get_timestamp
:no-index:

.. automethod:: lumibot.brokers.alpaca.Alpaca.is_market_open
:no-index:
69 changes: 69 additions & 0 deletions docs/_static/debug.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
This CSS file should be overridden by the theme authors. It's
meant for debugging and developing the skeleton that this theme provides.
*/
body {
font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji";
background: lavender;
}
.sb-announcement {
background: rgb(131, 131, 131);
}
.sb-announcement__inner {
background: black;
color: white;
}
.sb-header {
background: lightskyblue;
}
.sb-header__inner {
background: royalblue;
color: white;
}
.sb-header-secondary {
background: lightcyan;
}
.sb-header-secondary__inner {
background: cornflowerblue;
color: white;
}
.sb-sidebar-primary {
background: lightgreen;
}
.sb-main {
background: blanchedalmond;
}
.sb-main__inner {
background: antiquewhite;
}
.sb-header-article {
background: lightsteelblue;
}
.sb-article-container {
background: snow;
}
.sb-article-main {
background: white;
}
.sb-footer-article {
background: lightpink;
}
.sb-sidebar-secondary {
background: lightgoldenrodyellow;
}
.sb-footer-content {
background: plum;
}
.sb-footer-content__inner {
background: palevioletred;
}
.sb-footer {
background: pink;
}
.sb-footer__inner {
background: salmon;
}
.sb-article {
background: white;
}
3 changes: 3 additions & 0 deletions docs/_static/pygments.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #ef2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
Expand Down Expand Up @@ -107,6 +108,7 @@ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /*
body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */
body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */
body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */
Expand Down Expand Up @@ -192,6 +194,7 @@ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: ital
body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */
body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */
body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions docs/_static/scripts/furo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions docs/_static/scripts/furo.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*!
* gumshoejs v5.1.2 (patched by @pradyunsg)
* A simple, framework-agnostic scrollspy script.
* (c) 2019 Chris Ferdinandi
* MIT License
* http://github.com/cferdinandi/gumshoe
*/
1 change: 1 addition & 0 deletions docs/_static/scripts/furo.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 2742c49

Please sign in to comment.