10

I'm playing around with Enigma Catalyst. Unfortunately, the documentation is rather limited.

So I'm trying to run their example "hello world" type algo which looks as follows:

from catalyst import run_algorithm
from catalyst.api import order, record, symbol
import pandas as pd

def initialize(context):
    context.asset = symbol('btc_usd')


def handle_data(context, data):
    order(context.asset, 1)
    record(btc=data.current(context.asset, 'price'))


if __name__ == '__main__':
    run_algorithm(
        capital_base=10000,
        data_frequency='daily',
        initialize=initialize,
        handle_data=handle_data,
        exchange_name='Bitfinex',
        algo_namespace='buy_and_hodl',
        base_currency='usd',
        start=pd.to_datetime('2018-01-02', utc=True),
        end=pd.to_datetime('2018-01-03', utc=True),
    )

I realize according to the documentation it says you first need to "ingest" download the historical data which I believe I did. However this leads to the following error:

[2018-02-25 02:54:10.696049] WARNING: Loader: Refusing to download new
treasury data because a download succeeded at 2018-02-25
02:08:26.001177+00:00.

Which results in no data

[2018-02-25 02:54:10.830665] INFO: Performance: first open: 2018-01-02
00:00:00+00:00 [2018-02-25 02:54:10.830665] INFO: Performance: last
close: 2018-01-03 23:59:00+00:00

Question:

How do I access the downloaded data? Or, how do I delete and re-download the historical data, which is not covered in the docs?

Many Thanks.

4

1 回答 1

2

在 Discord 上的核心 Catalyst 开发人员的帮助下解决了这个问题。定价数据作为数据包从 Catalyst 服务器下载到本地计算机上。每次计划使用它时都必须启动催化剂环境。在 Enigma Catalyst 环境中,您可以使用catalyst clean命令清除数据包(以前下载的定价数据)。

于 2018-03-04T01:23:02.533 回答