set title "Price data" set xlabel "year" set ylabel "price" set grid set label 1 right at first 2022.20,13301.95 "BUY1" textcolor rgb "red" set label 2 left at first 2024.00,13301.95 "BUY2" textcolor rgb "red" plot "$attach_plot.txt" using 1:2 with line title "price (predict)", \ "$attach_plot.txt" using 1:2:3 with filledc fill pattern 4 notitle ---- plot.txt 2025.00 16320.75 16320.75 2024.00 13301.95 16320.75 2023.00 12000.00 16320.75 2022.20 13301.95 16320.75 2022.10 14905.00 16320.75 2022.00 16320.75 16320.75 2021.90 16150.50 16150.50 2021.80 15838.50 15838.50 2021.70 14682.50 14682.50 2021.60 14955.75 14955.75 2021.50 14549.00 14549.00 2021.40 13686.50 13686.50 2021.30 13850.00 13850.00 2021.20 13089.75 13089.75 2021.10 12911.00 12911.00 2021.00 12911.25 12911.25 2020.90 12885.50 12885.50 2020.80 11046.25 11046.25 2020.70 11407.25 11407.25 2020.60 12114.00 12114.00 2020.50 10890.50 10890.50 2020.40 10147.25 10147.25 2020.30 9560.25 9560.25 2020.20 8988.50 8988.50 2020.10 8454.00 8454.00 2020.00 8997.75 8997.75
\(e^x = \sum_{n=0}^{ \infty } { \frac{x^n}{n!} } = 1 + x + { \frac{x^2}{2} } + { \frac{x^3}{6} } + \cdots \approx 1 + x \\ \)
|サンプリング期間|←−−売買期間−−→| (この期間は見ない) 〇 〇 〇……〇 〇 ● ● ●……● ★ □ □ □ □ □ 1 2 3 k k+1 k+2 k+3 t-1 t n
\(\begin{cases} 0 & {t \leq k }\\ 1 & {t > k } \end{cases} \)
\(\frac{1}{n} \)
\(\frac{k}{t-1} \)
\(P = \sum_{t=k-1}^{n} { \frac{1}{n} \frac{k}{t+1}} = \frac{k}{n} (\frac{1}{k} + \frac{1}{k+1} + \frac{1}{k+2} + \cdots + \frac{1}{n-1}) = \frac{k}{n} Q \\ \)
\(e^Q = e^{\frac{1}{k} + \frac{1}{k+1} + \frac{1}{k+2} + \cdots + \frac{1}{n-1}} = e^{\frac{1}{k}} e^{\frac{1}{k+1}} e^{\frac{1}{k+2}} \cdots e^{\frac{1}{n-1}} \\ \approx ( 1 + \frac{1}{k} ) ( 1 + \frac{1}{k+1} ) ( 1 + \frac{1}{k+2} ) \cdots ( 1 + \frac{1}{n-1}) =\frac{k+1}{k} \frac{k+2}{k+1} \frac{k+3}{k+2} \cdots \frac{n}{n-1} = \frac{n}{k} \\ \)
\(\therefore Q = log \frac{n}{k} \\ \therefore P = \frac{k}{n} Q = \frac{k}{n} log \frac{n}{k} \)
\(P' = {\frac{1}{n} log \frac{n}{k}} - \frac{1}{n} \)
\(k = 20 * 0.36 = 7.35 \)
最初の 7 日間は、サンプリング期間として取引を留保すればいいのね\(f(x) = \sum_{n=0}^\infty \frac{f^{(n)} (a)}{n!} (x-a)^n = f(a) + f'(a)(x-a) + \frac{1}{2!} f''(a)(x-a)^2 + \frac{1}{3!} f'''(a)(x-a)^3 + \ldots \)
\(f(x) = f(a) + f'(a)(x-a) + \frac{1}{2!} f''(a)(x-a)^2 + \frac{1}{3!} f'''(a)(x-a)^3 + \ldots \\ f(a) = f(a) + f'(a)(a-a) + \frac{1}{2!} f''(a)(a-a)^2 + \frac{1}{3!} f'''(a)(a-a)^3 + \ldots = f(a) \)
\(f'(x) = f'(a) + \frac{2}{2!} f''(a)(x-a) + \frac{3}{3!} f''(a)(x-a)^2 + \ldots \\ = f'(a) + f''(a)(x-a) + \frac{3}{3!} f''(a)(x-a)^2 + \ldots \\ f'(a) = f'(a) + f''(a)(a-a) + \frac{3}{3!} f''(a)(a-a)^2 + \ldots = f'(a) \)
\(f''(x) = f''(a) + \frac{3 \times 2}{3!} f''(x)(x-a) + \ldots \\ = f''(a) + f'''(a)(x-a) + \ldots \\ f''(a) = f''(a) + f'''(a)(a-a) + \ldots = f''(a) \)
\(f'''(x) = f'''(a) + \ldots \\ f'''(a) = f'''(a) \)
Quntis バーライト ディスクライト 52cm モニターライト 掛け式 USB LED ライト 無段階色温度と輝度 目に優しい' スペース節約 PC作業/残業/寝室/卓上/読書/譜面台/ピアノ/オケピ/ネトゲ廃人に対応 ブラック L206ネトゲ廃人御用達!
#!/usr/bin/env python # -*- coding:utf-8 -*- import argparse import subprocess from itertools import permutations def main(): parser = argparse.ArgumentParser() parser.add_argument('-p', '--pattern', help='word pattern', required=True) parser.add_argument('-i', '--include', help='include words', required=False) parser.add_argument('-e', '--exclude', help='exclude words', required=False) args = parser.parse_args() word_regex = "^(" word_template = args.pattern seed = '' if None == args.include else args.include seed = seed + "-"*(word_template.count("_") - len(seed)) exclude_pattern = '[^\']' if None == args.exclude else "[^\'" + args.exclude + "]" for p in set(permutations(seed)) : idx = 0 for c in word_template : if '_' == c : word_regex += exclude_pattern if '-' == p[idx] else p[idx] idx += 1 else : word_regex += c word_regex += "|" word_regex += ")$" command = "grep -E \"" + word_regex.replace("|)", ")") + "\" /usr/share/dict/words" proc = subprocess.Popen( command, shell = True, # sh -c "command" stdin = subprocess.PIPE, #1 stdout = subprocess.PIPE, #2 stderr = subprocess.PIPE) #3 stdout_data, stderr_data = proc.communicate() #wait if (isinstance(stdout_data, bytes)): print (stdout_data.decode("UTF-8")) else: print (stdout_data) if __name__ == '__main__': main()