Dự án này đã lâu không có cập nhật mới nên không còn hiển thị trên trang chủ, danh mục hay kết quả tìm kiếm — dữ liệu vẫn được giữ nguyên và trang này vẫn xem được bình thường.
RepositoryPython
aistairc

aistairc/market-reporter

Automatic Generation of Brief Summaries of Time-Series Data

66sao
15fork
1issue
0lượt xem

Market Reporter

CircleCI

日本語

Market Reporter automatically generates short comments that describe time series data of stock prices, FX rates, etc. This is an implementation of Murakami et al. (ACL 2017) [bib] [paper] and Aoki et al. (INLG 2018) [bib] [paper] [poster].

Table of Contents

Requirements

Architecture

The architecture is illustrated below.

Credit of the icons

Resources

Amazon S3

This tool stores data to Amazon S3. Ask the manager to give you AmazonS3FullAccess and issue a credential file. For details, please read AWS Identity and Access Management.

Docker

Install Docker and Docker Compose. Edit envs/docker-compose.yaml according to your environment. Then, launch containers by docker-compose.

# Install Docker
sudo apt-get update
sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable"
sudo apt-get update
sudo apt-get install -y \
    docker-ce \
    docker-ce-cli \
    containerd.io

# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

# Start Docker and log in
cd envs
sudo service docker start
sudo docker-compose up -d
sudo exec --user reporter -it CONTAINER /bin/bash

Pipenv

We recommend to use pipenv to make a Python environment for this project.

brew install pipenv  # Linuxbrew and Homebrew
pipenv install --dev
pipenv shell

PostgreSQL

Suppose you have a database named master on your local machine. Then, edit config.toml as the following.

[postgres]
- uri = 'postgresql://USERNAME:PASSWORD@SERVER:PORT/DATABASE'
+ uri = 'postgresql:///master'

Usage

Training

Create config.toml based on example.toml or murakami-et-al-2017.example.toml.

Execute the following command for the training of model. When you use GPU (CPU), you specify cuda:n(cpu) for --device option, where n is the device index to use.

python -m reporter --device 'cuda:0'

After the program finishes, it saves three files (reporter.log, reporter.model, and reporter.vocab) to config.output_dir/reporter-DATETIME, where config.output_dir is a variable set in config.toml and DATETIME is the timestamp of the starting time.

Prediction

Prediction submodule generates a single comment of a financial instrument at specified time by loading a trained model.

# -r, --ric: Reuters Instrument Code (e.g. '.N225' for Nikkei Stock Average)
# -t, --time: timestamp in '%Y-%m-%d %H:%M:%S%z' format
# -o, --output: directory that contains 'reporter.model' and 'reporter.vocab'
python -m reporter.predict \
    -r '.N225' \
    -t '2018-10-03 09:03:00+0900' \
    -o output/reporter-2018-10-07-18-47-41

Web Interface

Execute the following command and access http://localhost:5000/ in a web browser.

make  # for the first time
python -m reporter.webapp

When you launch it on a server, execute the following command instead.

nohup uwsgi --ini uwsgi.ini &

You can see a page as the following picture.

The web application can be used for evaluation. Along with the generated sentences, it also shows the movements of prices used in generation.

Test

pytest

License and References

Market Reporter is available under different licensing options:

Commercial licenses are appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU. For details, please contact us at kirt-contact-ml@aist.go.jp

This software uses a technique applied for patent (patent application number 2017001583).

When you write a paper using this software, please cite either or both of the followings.

@InProceedings{murakami2017,
  author = {Murakami, Soichiro
            and Watanabe, Akihiko
            and Miyazawa, Akira
            and Goshima, Keiichi
            and Yanase, Toshihiko
            and Takamura, Hiroya
            and Miyao, Yusuke},
  title = {Learning to Generate Market Comments from Stock Prices},
  booktitle = {Proceedings of the 55th Annual Meeting of
               the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2017},
  publisher = {Association for Computational Linguistics},
  pages = {1374--1384},
  location = {Vancouver, Canada},
  doi = {10.18653/v1/P17-1126},
  url = {http://www.aclweb.org/anthology/P17-1126}
}

@InProceedings{aoki2018,
  author = {Aoki, Tatsuya
            and Miyazawa, Akira
            and Ishigaki, Tatsuya
            and Goshima, Keiichi
            and Aoki, Kasumi
            and Kobayashi, Ichiro
            and Takamura, Hiroya
            and Miyao, Yusuke},
  title = {Generating Market Comments Referring to External Resources},
  booktitle = {Proceedings of the 11th International Conference on Natural Language Generation},
  year = {2018},
  publisher = {Association for Computational Linguistics},
  pages = {135--139},
  location = {Tilburg University, The Netherlands},
  url = {http://aclweb.org/anthology/W18-6515}
}

© 2018 Akira Miyazawa, Tatsuya Aoki, Fumiya Yamamoto, Soichiro Murakami, and Akihiko Watanabe (National Institute of Advanced Industrial Science and Technology; AIST)

This software is based on results obtained from a project commissioned by the New Energy and Industrial Technology Development Organization (NEDO).

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

82.1k
Jul 30, 2024
RepositoryPython
openbq-org/OpenBB

Open Data Platform for analysts, quants and AI agents.

74.6k
Oct 18, 2026
RepositoryPython
explosion/spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python

34.0k
Oct 12, 2026
RepositoryPython
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

168.0k
Oct 23, 2026
Modeltext-generation
deepseek-ai/DeepSeek-R1

DeepSeek-R1 Paper Link👁️ 1. Introduction We introduce our first-generation reasoning models, DeepSeek-R1-Zero and DeepSeek-R1. DeepSeek-R1-Zero, a model trained via large-scale reinforcement learning (RL) without supervised fine-tuning (SFT) as a p...

♥0
1.5M
Mar 27, 2025
RepositoryJupyter Notebook
GokuMohandas/Made-With-ML

Learn how to develop, deploy and iterate on production-grade ML applications.

49.8k
Mar 4, 2026
RepositoryPython
microsoft/qlib

Qlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, including supervised learning, market dynamics modeling, and RL, and is now equipped with https://github.com/microsoft/RD-Agent to automate R&D process.

49.7k
Oct 22, 2026
Modeltext-generation
meta-llama/Llama-3.1-8B-Instruct

Model Information The Meta Llama 3.1 collection of multilingual large language models (LLMs) is a collection of pretrained and instruction tuned generative models in 8B, 70B and 405B sizes (text in/text out). The Llama 3.1 instruction tuned text onl...

♥0
4.8M
Sep 25, 2024
Modeltext-generation
openai-community/gpt2

GPT-2 Test the whole generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in this paper(https://d4mucfpksywv.cloudfro...

♥0
21.8M
Feb 19, 2024