SlideShare a Scribd company logo
Shizuoka.py #5 Tetsuya Tatsumi dokechin
BOT
BOT
CSV
▸ Quandl)
BOT
CSV
▸ FRB 2000
BOT
▸
NASDAQ SP500 DAX
2002-09-10 9309 120.68 1320.2 909.58 3494
2002-09-11 9400 121.50 1315.0 909.45 3584
2002-09-12 9415 122.17 1280.0 886.90 3421
BOT
CSV
▸ pandas
▸ sort
# read cvs file and sort by specific column
ni225 = pandas.read_csv("YAHOO-INDEX_N225.csv",parse_dates=True)
ni225 = ni225.dropna()
ni225 = ni225.sort_values(by="Date", ascending=True).reset_index(drop=True)
BOT
▸ −
▸ n
# normalizations of features
features = numpy.array(features)
features = (features - features.min(0)) / features.ptp(0)
BOT
▸ SVM
▸
▸
clf = svm.SVC()
tuned_parameters = {'kernel': ['rbf'], 'gamma': [0.2,0.1,0.08,0.07,0.06,0.04,0.03,0.02],
'C': [10,20,30,40,50]}
grid = grid_search.GridSearchCV(estimator=clf, param_grid=tuned_parameters)
grid.fit(features, labels)
print (grid.grid_scores_)
BOT
BOT
▸ configparser
▸ Tweet python-twitter
predict = clf.predict(feature)
inifile = configparser.ConfigParser()
inifile.read("./config.ini")
api = twitter.Api(
consumer_key = inifile.get("twitter","consumer_key"),
consumer_secret = inifile.get("twitter","consumer_secret"),
access_token_key = inifile.get("twitter","access_token_key"),
access_token_secret = inifile.get("twitter","access_token_secret")
)
content = "# # http://niyo.dokechin.com "
if predict == 1:
content +=" "
else:
content +=" "
api.PostUpdate(content)
BOT
BOT
▸
▸
▸

More Related Content

What's hot

The Ring programming language version 1.5.1 book - Part 63 of 180
The Ring programming language version 1.5.1 book - Part 63 of 180The Ring programming language version 1.5.1 book - Part 63 of 180
The Ring programming language version 1.5.1 book - Part 63 of 180
Mahmoud Samir Fayed
 
Accelerating Local Search with PostgreSQL (KNN-Search)
Accelerating Local Search with PostgreSQL (KNN-Search)Accelerating Local Search with PostgreSQL (KNN-Search)
Accelerating Local Search with PostgreSQL (KNN-Search)
Jonathan Katz
 
Typelevel summit
Typelevel summitTypelevel summit
Typelevel summit
Marina Sigaeva
 
Herding types with Scala macros
Herding types with Scala macrosHerding types with Scala macros
Herding types with Scala macros
Marina Sigaeva
 
The Ring programming language version 1.6 book - Part 69 of 189
The Ring programming language version 1.6 book - Part 69 of 189The Ring programming language version 1.6 book - Part 69 of 189
The Ring programming language version 1.6 book - Part 69 of 189
Mahmoud Samir Fayed
 
Azure sql insert perf
Azure sql insert perfAzure sql insert perf
Azure sql insert perf
Mornè Blake
 
FunctionalJS - George Shevtsov
FunctionalJS - George ShevtsovFunctionalJS - George Shevtsov
FunctionalJS - George Shevtsov
Georgiy Shevtsov
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov
Yulia Shcherbachova
 
ECMAScript 5: Новое в JavaScript
ECMAScript 5: Новое в JavaScriptECMAScript 5: Новое в JavaScript
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Altinity Ltd
 
Daniel Sikar: Hadoop MapReduce - 06/09/2010
Daniel Sikar: Hadoop MapReduce - 06/09/2010 Daniel Sikar: Hadoop MapReduce - 06/09/2010
Daniel Sikar: Hadoop MapReduce - 06/09/2010
Skills Matter
 
Parallel Computing with R
Parallel Computing with RParallel Computing with R
Parallel Computing with R
Peter Solymos
 
Brief intro to clojure
Brief intro to clojureBrief intro to clojure
Brief intro to clojure
Roy Rutto
 
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
Altinity Ltd
 
Zone.js 2017
Zone.js 2017Zone.js 2017
Zone.js 2017
Jia Li
 
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenJohn Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenPostgresOpen
 
Academy PRO: Elasticsearch Misc
Academy PRO: Elasticsearch MiscAcademy PRO: Elasticsearch Misc
Academy PRO: Elasticsearch Misc
Binary Studio
 

What's hot (19)

The Ring programming language version 1.5.1 book - Part 63 of 180
The Ring programming language version 1.5.1 book - Part 63 of 180The Ring programming language version 1.5.1 book - Part 63 of 180
The Ring programming language version 1.5.1 book - Part 63 of 180
 
Accelerating Local Search with PostgreSQL (KNN-Search)
Accelerating Local Search with PostgreSQL (KNN-Search)Accelerating Local Search with PostgreSQL (KNN-Search)
Accelerating Local Search with PostgreSQL (KNN-Search)
 
Typelevel summit
Typelevel summitTypelevel summit
Typelevel summit
 
Herding types with Scala macros
Herding types with Scala macrosHerding types with Scala macros
Herding types with Scala macros
 
The Ring programming language version 1.6 book - Part 69 of 189
The Ring programming language version 1.6 book - Part 69 of 189The Ring programming language version 1.6 book - Part 69 of 189
The Ring programming language version 1.6 book - Part 69 of 189
 
Azure sql insert perf
Azure sql insert perfAzure sql insert perf
Azure sql insert perf
 
FunctionalJS - George Shevtsov
FunctionalJS - George ShevtsovFunctionalJS - George Shevtsov
FunctionalJS - George Shevtsov
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov
 
ECMAScript 5: Новое в JavaScript
ECMAScript 5: Новое в JavaScriptECMAScript 5: Новое в JavaScript
ECMAScript 5: Новое в JavaScript
 
ts
tsts
ts
 
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert HodgesWebinar: Secrets of ClickHouse Query Performance, by Robert Hodges
Webinar: Secrets of ClickHouse Query Performance, by Robert Hodges
 
Daniel Sikar: Hadoop MapReduce - 06/09/2010
Daniel Sikar: Hadoop MapReduce - 06/09/2010 Daniel Sikar: Hadoop MapReduce - 06/09/2010
Daniel Sikar: Hadoop MapReduce - 06/09/2010
 
Parallel Computing with R
Parallel Computing with RParallel Computing with R
Parallel Computing with R
 
Brief intro to clojure
Brief intro to clojureBrief intro to clojure
Brief intro to clojure
 
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
 
Zone.js 2017
Zone.js 2017Zone.js 2017
Zone.js 2017
 
R meets Hadoop
R meets HadoopR meets Hadoop
R meets Hadoop
 
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres OpenJohn Melesky - Federating Queries Using Postgres FDW @ Postgres Open
John Melesky - Federating Queries Using Postgres FDW @ Postgres Open
 
Academy PRO: Elasticsearch Misc
Academy PRO: Elasticsearch MiscAcademy PRO: Elasticsearch Misc
Academy PRO: Elasticsearch Misc
 

Similar to 日経平均上下予想Botを作った話

Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OSPractical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
Cuneyt Goksu
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
 
More than `po`: Debugging in lldb
More than `po`: Debugging in lldbMore than `po`: Debugging in lldb
More than `po`: Debugging in lldb
Michele Titolo
 
Scala meetup - Intro to spark
Scala meetup - Intro to sparkScala meetup - Intro to spark
Scala meetup - Intro to spark
Javier Arrieta
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applications
Skills Matter
 
The Ring programming language version 1.5.1 book - Part 26 of 180
The Ring programming language version 1.5.1 book - Part 26 of 180The Ring programming language version 1.5.1 book - Part 26 of 180
The Ring programming language version 1.5.1 book - Part 26 of 180
Mahmoud Samir Fayed
 
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, HerokuPostgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
Redis Labs
 
R for you
R for youR for you
R for you
Andreas Chandra
 
Explain this!
Explain this!Explain this!
Explain this!
Fabio Telles Rodriguez
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
EDB
 
The Ring programming language version 1.7 book - Part 31 of 196
The Ring programming language version 1.7 book - Part 31 of 196The Ring programming language version 1.7 book - Part 31 of 196
The Ring programming language version 1.7 book - Part 31 of 196
Mahmoud Samir Fayed
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Reportnyin27
 
The Ring programming language version 1.10 book - Part 36 of 212
The Ring programming language version 1.10 book - Part 36 of 212The Ring programming language version 1.10 book - Part 36 of 212
The Ring programming language version 1.10 book - Part 36 of 212
Mahmoud Samir Fayed
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
Stacy Irwin
 
How to teach an elephant to rock'n'roll
How to teach an elephant to rock'n'rollHow to teach an elephant to rock'n'roll
How to teach an elephant to rock'n'roll
PGConf APAC
 
GCC
GCCGCC

Similar to 日経平均上下予想Botを作った話 (20)

Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OSPractical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
Practical Recipes for Daily DBA Activities using DB2 9 and 10 for z/OS
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
More than `po`: Debugging in lldb
More than `po`: Debugging in lldbMore than `po`: Debugging in lldb
More than `po`: Debugging in lldb
 
Scala meetup - Intro to spark
Scala meetup - Intro to sparkScala meetup - Intro to spark
Scala meetup - Intro to spark
 
Patterns for slick database applications
Patterns for slick database applicationsPatterns for slick database applications
Patterns for slick database applications
 
The Ring programming language version 1.5.1 book - Part 26 of 180
The Ring programming language version 1.5.1 book - Part 26 of 180The Ring programming language version 1.5.1 book - Part 26 of 180
The Ring programming language version 1.5.1 book - Part 26 of 180
 
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, HerokuPostgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
Postgres & Redis Sitting in a Tree- Rimas Silkaitis, Heroku
 
R for you
R for youR for you
R for you
 
Explain this!
Explain this!Explain this!
Explain this!
 
OLTP+OLAP=HTAP
 OLTP+OLAP=HTAP OLTP+OLAP=HTAP
OLTP+OLAP=HTAP
 
The Ring programming language version 1.7 book - Part 31 of 196
The Ring programming language version 1.7 book - Part 31 of 196The Ring programming language version 1.7 book - Part 31 of 196
The Ring programming language version 1.7 book - Part 31 of 196
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Report
 
The Ring programming language version 1.10 book - Part 36 of 212
The Ring programming language version 1.10 book - Part 36 of 212The Ring programming language version 1.10 book - Part 36 of 212
The Ring programming language version 1.10 book - Part 36 of 212
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
How to teach an elephant to rock'n'roll
How to teach an elephant to rock'n'rollHow to teach an elephant to rock'n'roll
How to teach an elephant to rock'n'roll
 
GCC
GCCGCC
GCC
 

More from dokechin

ダンドリーキッチン
ダンドリーキッチンダンドリーキッチン
ダンドリーキッチン
dokechin
 
Mxnetによるデープラーニングでセミの抜け殻を識別する
Mxnetによるデープラーニングでセミの抜け殻を識別するMxnetによるデープラーニングでセミの抜け殻を識別する
Mxnetによるデープラーニングでセミの抜け殻を識別する
dokechin
 
Iot data aggrigation
Iot data aggrigationIot data aggrigation
Iot data aggrigation
dokechin
 
Iot data aggrigation
Iot data aggrigationIot data aggrigation
Iot data aggrigation
dokechin
 
オープンデータを利用したWebアプリ開発
オープンデータを利用したWebアプリ開発オープンデータを利用したWebアプリ開発
オープンデータを利用したWebアプリ開発
dokechin
 
Perlでbdd
PerlでbddPerlでbdd
Perlでbdd
dokechin
 
クラウドストレージを使って音声投稿サイトを作った話
クラウドストレージを使って音声投稿サイトを作った話クラウドストレージを使って音声投稿サイトを作った話
クラウドストレージを使って音声投稿サイトを作った話
dokechin
 
Mojolicous and Bootstrap
Mojolicous and BootstrapMojolicous and Bootstrap
Mojolicous and Bootstrap
dokechin
 
Learn fromalphageeks
Learn fromalphageeksLearn fromalphageeks
Learn fromalphageeks
dokechin
 

More from dokechin (9)

ダンドリーキッチン
ダンドリーキッチンダンドリーキッチン
ダンドリーキッチン
 
Mxnetによるデープラーニングでセミの抜け殻を識別する
Mxnetによるデープラーニングでセミの抜け殻を識別するMxnetによるデープラーニングでセミの抜け殻を識別する
Mxnetによるデープラーニングでセミの抜け殻を識別する
 
Iot data aggrigation
Iot data aggrigationIot data aggrigation
Iot data aggrigation
 
Iot data aggrigation
Iot data aggrigationIot data aggrigation
Iot data aggrigation
 
オープンデータを利用したWebアプリ開発
オープンデータを利用したWebアプリ開発オープンデータを利用したWebアプリ開発
オープンデータを利用したWebアプリ開発
 
Perlでbdd
PerlでbddPerlでbdd
Perlでbdd
 
クラウドストレージを使って音声投稿サイトを作った話
クラウドストレージを使って音声投稿サイトを作った話クラウドストレージを使って音声投稿サイトを作った話
クラウドストレージを使って音声投稿サイトを作った話
 
Mojolicous and Bootstrap
Mojolicous and BootstrapMojolicous and Bootstrap
Mojolicous and Bootstrap
 
Learn fromalphageeks
Learn fromalphageeksLearn fromalphageeks
Learn fromalphageeks
 

Recently uploaded

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 

Recently uploaded (20)

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 

日経平均上下予想Botを作った話

  • 1. Shizuoka.py #5 Tetsuya Tatsumi dokechin BOT
  • 4. BOT ▸ NASDAQ SP500 DAX 2002-09-10 9309 120.68 1320.2 909.58 3494 2002-09-11 9400 121.50 1315.0 909.45 3584 2002-09-12 9415 122.17 1280.0 886.90 3421
  • 5. BOT CSV ▸ pandas ▸ sort # read cvs file and sort by specific column ni225 = pandas.read_csv("YAHOO-INDEX_N225.csv",parse_dates=True) ni225 = ni225.dropna() ni225 = ni225.sort_values(by="Date", ascending=True).reset_index(drop=True)
  • 6. BOT ▸ − ▸ n # normalizations of features features = numpy.array(features) features = (features - features.min(0)) / features.ptp(0)
  • 7. BOT ▸ SVM ▸ ▸ clf = svm.SVC() tuned_parameters = {'kernel': ['rbf'], 'gamma': [0.2,0.1,0.08,0.07,0.06,0.04,0.03,0.02], 'C': [10,20,30,40,50]} grid = grid_search.GridSearchCV(estimator=clf, param_grid=tuned_parameters) grid.fit(features, labels) print (grid.grid_scores_)
  • 8. BOT BOT ▸ configparser ▸ Tweet python-twitter predict = clf.predict(feature) inifile = configparser.ConfigParser() inifile.read("./config.ini") api = twitter.Api( consumer_key = inifile.get("twitter","consumer_key"), consumer_secret = inifile.get("twitter","consumer_secret"), access_token_key = inifile.get("twitter","access_token_key"), access_token_secret = inifile.get("twitter","access_token_secret") ) content = "# # http://niyo.dokechin.com " if predict == 1: content +=" " else: content +=" " api.PostUpdate(content)
  • 9. BOT