FrontPage / Stock


FrontPage

jobs

daily

ジョブ名内容
S10get-stockmaster銘柄一覧(stock code)を取得
S20get-historydata個々銘柄について、price historyを取得
S30get-detaildata個々銘柄について、詳細データを取得
S40get-finstdata個々銘柄について、決算数値を取得

Directories

cron jobs

ディレクトリ内容
basedirベースdirectory
crondir=$basedir/croncronジョブ
cronbin=$crondir/bincronで使うスクリプト
bindir=$basedir/binバイナリ等
logdir=$crondir/logscron logs
dailydir=$crondir/jstockdailydaily cron(jstock)

conf dir

ディレクトリ内容
confdir設定ファイル用ディレクトリ
jstockconf=$confdir/jstockjstock用設定ディレクトリ

$jstockconf/以下

ファイル内容
industorymaster業種一覧
fundmasterファンド一覧
indexmasterindex一覧

data dir

ディレクトリ内容
jstockdir=$DataDir?/jstockjstock用データディレクトリ
masterdir=$jstockdir/stock_masterマスターデータ(stock code一覧)
historydir=$jstockdir/price_historyprice historyデータ
finance=$jstockdir/finance決算指標データ

DB: jstock

Table: stocklist

項目内容
industryvarchar(25) not null業種
stockcodeinteger not nullコード

template_historydata

項目内容
datedate unique not null日付
openinteger not null始値
highinteger not null高値
lowinteger not null安値
closeinteger not null終値
volumeinteger not null出来高
adj_closeinteger not null調整後終値
  • history_1301
    create table history_1301 as (~~
    select * from template_historydata~~
    );


値のセット: obsolete

  • copy history_1301 from '/usr/home/(username)/Data/forestry_fishery/history.1301';
  • \copy history_1301 from '/usr/home/(username)/Data/forestry_fishery/history.1301'

※index(23337, 998405, 998407は100倍してload)

DB: stockdata: obsolete?

  • Tabel1: template_historicalprices
    create table template_historicalprices (~~
    date date not null,~~
    open integer,~~
    high integer,~~
    low integer,~~
    close integer,~~
    volume integer,~~
    adj_close integer~~
    );
  • Table2: history_1301
    create table history_1301 as (~~
    select * from template_historicalprices~~
    );