(feat) add backtesting components

This commit is contained in:
cardosofede
2024-05-17 01:09:22 -04:00
parent d87f959860
commit f42b7eccbf
2 changed files with 14 additions and 10 deletions

View File

@@ -3,13 +3,15 @@ from datetime import datetime, timedelta
def backtesting_section(inputs, backend_api_client):
st.write("### Backtesting")
c1, c2, c3, c4, c5 = st.columns(5)
default_end_time = datetime.now().date()
default_end_time = datetime.now().date() - timedelta(days=1)
default_start_time = default_end_time - timedelta(days=2)
with c1:
start_date = st.date_input("Start Date", default_start_time)
with c2:
end_date = st.date_input("End Date", default_end_time)
end_date = st.date_input("End Date", default_end_time,
help="End date is inclusive, make sure that you are not including the current date.")
with c3:
backtesting_resolution = st.selectbox("Backtesting Resolution", options=["1m", "3m", "5m", "15m", "30m", "1h", "1s"], index=0)
with c4: