text: Search.setIndex({docnames:["app","index","server","system","system.ai_modeling","system.database","system.market_data","system.portfolio","system.sim_trading","system.stat_arb","system.utility"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["app.rst","index.rst","server.rst","system.rst","system.ai_modeling.rst","system.database.rst","system.market_data.rst","system.portfolio.rst","system.sim_trading.rst","system.stat_arb.rst","system.utility.rst"],objects:{"":{app:[0,0,0,"-"],server:[2,0,0,"-"],system:[3,0,0,"-"]},"system.ai_modeling":{ga_portfolio:[4,0,0,"-"],ga_portfolio_back_test:[4,0,0,"-"],ga_portfolio_main:[4,0,0,"-"],ga_portfolio_probation_test:[4,0,0,"-"],ga_portfolio_select:[4,0,0,"-"]},"system.ai_modeling.ga_portfolio":{Fundamental:[4,2,1,""],GAPortfolio:[4,2,1,""],ProbationTestTrade:[4,2,1,""],Stock:[4,2,1,""],Trade:[4,2,1,""]},"system.ai_modeling.ga_portfolio.GAPortfolio":{add_beta:[4,3,1,""],calculate_beta_and_trend:[4,3,1,""],calculate_daily_cumulative_return:[4,3,1,""],calculate_expected_beta:[4,3,1,""],calculate_jensen_measure:[4,3,1,""],calculate_portfolio_return:[4,3,1,""],calculate_score:[4,3,1,""],calculate_sharpe_ratio:[4,3,1,""],calculate_treynor_measure:[4,3,1,""],calculate_yield:[4,3,1,""],get_stock:[4,3,1,""],populate_portfolio:[4,3,1,""],populate_portfolio_by_symbols:[4,3,1,""],populate_portfolio_fundamentals:[4,3,1,""],update_stock:[4,3,1,""]},"system.ai_modeling.ga_portfolio.ProbationTestTrade":{calculate_profit_loss:[4,3,1,""]},"system.ai_modeling.ga_portfolio.Stock":{add_trade:[4,3,1,""],calculate_daily_cumulative_return:[4,3,1,""],calculate_daily_return:[4,3,1,""],calculate_expected_return:[4,3,1,""],calculate_expected_risk_free_rate:[4,3,1,""],calculate_risk_free_rate:[4,3,1,""],calculate_volatility:[4,3,1,""]},"system.ai_modeling.ga_portfolio_back_test":{ga_back_test:[4,1,1,""],ga_back_test_plot:[4,1,1,""]},"system.ai_modeling.ga_portfolio_probation_test":{ga_probation_test:[4,1,1,""],previous_working_day:[4,1,1,""]},"system.ai_modeling.ga_portfolio_select":{build_ga_model:[4,1,1,""],create_populate_tables:[4,1,1,""],crossover_and_mutate:[4,1,1,""],extract_spy:[4,1,1,""],extract_us10y:[4,1,1,""]},"system.database":{fre_database:[5,0,0,"-"]},"system.database.fre_database":{FREDatabase:[5,2,1,""]},"system.database.fre_database.FREDatabase":{check_table_empty:[5,3,1,""],clear_table:[5,3,1,""],create_buy_transaction:[5,3,1,""],create_sell_transaction:[5,3,1,""],create_table:[5,3,1,""],drop_table:[5,3,1,""],execute_sql_statement:[5,3,1,""],get_portfolio:[5,3,1,""],get_sp500_sectors:[5,3,1,""],get_sp500_symbol_map:[5,3,1,""],get_sp500_symbols:[5,3,1,""],get_transaction:[5,3,1,""],get_user:[5,3,1,""]},"system.market_data":{fre_market_data:[6,0,0,"-"]},"system.market_data.fre_market_data":{EODMarketData:[6,2,1,""],IEXMarketData:[6,2,1,""]},"system.market_data.fre_market_data.EODMarketData":{get_daily_data:[6,3,1,""],get_fundamental_data:[6,3,1,""],get_intraday_data:[6,3,1,""],populate_fundamental_data:[6,3,1,""],populate_intraday_stock_data:[6,3,1,""],populate_sp500_data:[6,3,1,""],populate_stock_data:[6,3,1,""]},"system.market_data.fre_market_data.IEXMarketData":{get_price:[6,3,1,""],get_quote:[6,3,1,""]},"system.portfolio":{forms:[7,0,0,"-"],models:[7,0,0,"-"],users:[7,0,0,"-"]},"system.portfolio.forms":{EmailForm:[7,2,1,""],LoginForm:[7,2,1,""],PasswordForm:[7,2,1,""],RegisterForm:[7,2,1,""]},"system.portfolio.forms.EmailForm":{email:[7,4,1,""]},"system.portfolio.forms.LoginForm":{email:[7,4,1,""],password:[7,4,1,""]},"system.portfolio.forms.PasswordForm":{password:[7,4,1,""]},"system.portfolio.forms.RegisterForm":{confirm:[7,4,1,""],email:[7,4,1,""],first_name:[7,4,1,""],last_name:[7,4,1,""],password:[7,4,1,""]},"system.portfolio.models":{User:[7,2,1,""]},"system.portfolio.models.User":{authenticated:[7,4,1,""],cash:[7,4,1,""],current_logged_in:[7,4,1,""],email:[7,4,1,""],email_confirmed:[7,4,1,""],email_confirmed_on:[7,4,1,""],first_name:[7,4,1,""],get_id:[7,3,1,""],is_active:[7,3,1,""],is_anonymous:[7,3,1,""],is_authenticated:[7,3,1,""],is_correct_password:[7,3,1,""],last_logged_in:[7,4,1,""],last_name:[7,4,1,""],password:[7,4,1,""],registered_on:[7,4,1,""],role:[7,4,1,""],set_password:[7,4,1,""],user_id:[7,4,1,""]},"system.portfolio.users":{add_admin_user:[7,1,1,""],send_async_email:[7,1,1,""],send_confirmation_email:[7,1,1,""],send_email:[7,1,1,""],send_password_reset_email:[7,1,1,""]},"system.sim_trading":{client:[8,0,0,"-"],network:[8,0,0,"-"]},"system.sim_trading.client":{client_receive:[8,1,1,""],enter_a_new_order:[8,1,1,""],get_client_list:[8,1,1,""],get_market_status:[8,1,1,""],get_order_book:[8,1,1,""],get_response:[8,1,1,""],get_stock_list:[8,1,1,""],join_trading_network:[8,1,1,""],logon:[8,1,1,""],quit_connection:[8,1,1,""],send_msg:[8,1,1,""],server_down:[8,1,1,""],set_event:[8,1,1,""],wait_for_an_event:[8,1,1,""]},"system.sim_trading.network":{Packet:[8,2,1,""],PacketTypes:[8,2,1,""]},"system.sim_trading.network.Packet":{deserialize:[8,3,1,""],serialize:[8,3,1,""]},"system.sim_trading.network.PacketTypes":{BOOK_INQUIRY_REQ:[8,4,1,""],BOOK_INQUIRY_RSP:[8,4,1,""],CLIENT_LIST_REQ:[8,4,1,""],CLIENT_LIST_RSP:[8,4,1,""],CONNECTION_NONE:[8,4,1,""],CONNECTION_REQ:[8,4,1,""],CONNECTION_RSP:[8,4,1,""],END_REQ:[8,4,1,""],END_RSP:[8,4,1,""],MARKET_STATUS_REQ:[8,4,1,""],MARKET_STATUS_RSP:[8,4,1,""],NEW_ORDER_REQ:[8,4,1,""],NEW_ORDER_RSP:[8,4,1,""],SERVER_DOWN_REQ:[8,4,1,""],SERVER_DOWN_RSP:[8,4,1,""],STOCK_LIST_REQ:[8,4,1,""],STOCK_LIST_RSP:[8,4,1,""],STOCK_REQ:[8,4,1,""],STOCK_RSP:[8,4,1,""]},"system.stat_arb":{pair_trading:[9,0,0,"-"]},"system.stat_arb.pair_trading":{StockPair:[9,2,1,""],build_pair_trading_model:[9,1,1,""],cointegration_all_test:[9,1,1,""],cointegration_test:[9,1,1,""],create_stock_pairs:[9,1,1,""],pair_trade_back_test:[9,1,1,""],pair_trade_probation_test:[9,1,1,""],populate_stock_data:[9,1,1,""]},"system.stat_arb.pair_trading.StockPair":{create_trade:[9,3,1,""],update_betas:[9,3,1,""],update_trades:[9,3,1,""]},"system.utility":{config:[10,0,0,"-"],helpers:[10,0,0,"-"]},"system.utility.config":{ClientConfig:[10,2,1,""],ServerConfig:[10,2,1,""]},"system.utility.helpers":{FREWriter:[10,2,1,""],error_page:[10,1,1,""],errorhandler:[10,1,1,""],get_python_pid:[10,1,1,""],login_required:[10,1,1,""],lookup:[10,1,1,""],usd:[10,1,1,""]},"system.utility.helpers.FREWriter":{close:[10,3,1,""],flush:[10,3,1,""],write:[10,3,1,""]},app:{admin_view_users:[0,1,1,""],ai_back_test:[0,1,1,""],ai_back_test_plot:[0,1,1,""],ai_build_model:[0,1,1,""],ai_probation_test:[0,1,1,""],ai_trading:[0,1,1,""],build_model:[0,1,1,""],buy:[0,1,1,""],confirm_email:[0,1,1,""],email_change:[0,1,1,""],get_quote:[0,1,1,""],history:[0,1,1,""],index:[0,1,1,""],login:[0,1,1,""],logout:[0,1,1,""],market_data_fundamentals:[0,1,1,""],market_data_sp500:[0,1,1,""],market_data_sp500_sectors:[0,1,1,""],market_data_spy:[0,1,1,""],market_data_stock:[0,1,1,""],market_data_us10y:[0,1,1,""],model_back_testing:[0,1,1,""],model_probation_testing:[0,1,1,""],pair_trading:[0,1,1,""],portfolio:[0,1,1,""],register:[0,1,1,""],resend_email_confirmation:[0,1,1,""],reset:[0,1,1,""],reset_with_token:[0,1,1,""],sell:[0,1,1,""],sim_auto_trading:[0,1,1,""],sim_server_down:[0,1,1,""],sim_server_up:[0,1,1,""],sim_trading:[0,1,1,""],start_server_process:[0,1,1,""],user_password_change:[0,1,1,""],user_profile:[0,1,1,""]},server:{accept_incoming_connections:[2,1,1,""],close_trades:[2,1,1,""],create_market_interest:[2,1,1,""],generate_qty:[2,1,1,""],get_stock_list:[2,1,1,""],handle_client:[2,1,1,""],launch_server:[2,1,1,""],populate_intraday_order_map:[2,1,1,""],populate_order_table:[2,1,1,""],server_receive:[2,1,1,""],set_market_status:[2,1,1,""],update_market_status:[2,1,1,""]},system:{after_request:[3,1,1,""],ai_modeling:[4,0,0,"-"],database:[5,0,0,"-"],load_user:[3,1,1,""],market_data:[6,0,0,"-"],portfolio:[7,0,0,"-"],sim_trading:[8,0,0,"-"],stat_arb:[9,0,0,"-"],utility:[10,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:attribute"},terms:{"10000":7,"1585800000":6,"1585886400":6,"2020":[],"400":10,"class":[4,5,6,7,8,9,10],"enum":8,"float":[4,5,9],"function":[0,5,9],"int":[4,5,10],"new":[0,5],"return":[0,5,7,9],"true":[4,5,7],Not:[],The:[0,9],_io:6,accept_incoming_connect:2,action:6,activ:7,add_admin_us:7,add_beta:4,add_trad:4,address:[0,7],adf:9,adf_threshold:9,admin_view_us:0,after:5,after_request:3,ai_back_test:0,ai_back_test_plot:0,ai_build_model:0,ai_model:[1,3],ai_probation_test:0,ai_trad:0,all:[5,7,9],alwai:7,anonym:7,api:7,api_token:6,apolog:10,app:1,append:6,aren:7,arg:7,authent:7,automat:[],back:9,back_testing_end_d:9,back_testing_start_d:9,base:[4,5,6,7,8,9,10],beta0:9,beta1_hedgeratio:9,beta:4,birthdai:[],book_inquiry_req:8,book_inquiry_rsp:8,bool:[4,5],bui:[0,5],build:9,build_ga_model:4,build_model:0,build_pair_trading_model:9,calcul:9,calculate_beta_and_trend:4,calculate_daily_cumulative_return:4,calculate_daily_return:4,calculate_expected_beta:4,calculate_expected_return:4,calculate_expected_risk_free_r:4,calculate_jensen_measur:4,calculate_portfolio_daily_beta:[],calculate_portfolio_daily_return:[],calculate_portfolio_return:4,calculate_profit_loss:4,calculate_risk_free_r:4,calculate_scor:4,calculate_sharpe_ratio:4,calculate_treynor_measur:4,calculate_volatil:4,calculate_yield:4,cash:[5,7],categori:6,chang:5,check_day_:4,check_table_empti:5,christma:[],clear_tabl:5,client:[1,2,3],client_list_req:8,client_list_rsp:8,client_packet:8,client_rec:8,client_socket:2,clientconfig:10,close1:9,close2:9,close:10,close_trad:2,code:10,cointegr:9,cointegration_all_test:9,cointegration_test:9,collect:[5,6,9],columbu:[],config:[1,3],confirm:[0,7],confirm_email:0,connection_non:8,connection_req:8,connection_rsp:8,content:1,core:4,corr_threshold:9,correl:9,creat:[0,5,9],create_buy_transact:5,create_market_interest:2,create_populate_t:4,create_sell_transact:5,create_stock_pair:9,create_t:5,create_trad:9,crossover_and_mut:4,current_logged_in:7,dai:2,daili:[6,9],daily_risk_free_return:[],data:[6,9],databas:[1,3,4,6,9],database_uri:5,datafram:[4,9],datarequir:7,date:[4,9],datetim:[],declar:7,decor:10,delet:[],deseri:8,desir:6,dict:[2,4,5],dictionari:5,doc:10,drop_tabl:5,dure:9,email:[0,7],email_address:5,email_chang:0,email_confirm:7,email_confirmed_on:7,emailform:7,empti:5,end:[2,6,9],end_dat:[4,6,9],end_req:8,end_rsp:8,end_tim:[],endtim:6,enter_a_new_ord:8,enumer:8,eod_market_data:4,eodmarketdata:6,equalto:7,error:10,error_pag:10,errorhandl:10,everydai:[],execute_sql_stat:5,exist:5,ext:7,extract:5,extract_spi:4,extract_us10i:4,fals:[5,7],faster:[],filenam:10,first:7,first_nam:7,firstnam:0,firt:9,flask:[7,10],flask_wtf:7,flaskform:7,flush:10,form:[1,3],format:10,frame:4,fre:[0,10],fre_databas:[0,1,3],fre_market_data:[1,3],fredatabas:5,frewrit:[6,10],from:[5,9],fundament:[4,6],fundamental_df:4,ga_back_test:4,ga_back_test_plot:4,ga_portfolio:[1,3],ga_portfolio_back_test:[1,3],ga_portfolio_main:[1,3],ga_portfolio_probation_test:[1,3],ga_portfolio_select:[1,3],ga_probation_test:4,gaportfolio:4,generate_qti:2,get:5,get_client_list:8,get_daily_data:6,get_fundamental_data:6,get_id:7,get_intraday_data:6,get_market_statu:8,get_order_book:8,get_portfolio:5,get_pric:6,get_python_pid:10,get_quot:[0,6],get_respons:8,get_sp500_sector:5,get_sp500_symbol:5,get_sp500_symbol_map:5,get_stock:4,get_stock_list:[2,8],get_transact:5,get_us:5,given:9,handl:10,handle_cli:2,happen:5,helper:[1,3,6],histor:6,histori:0,hold:5,holidai:4,html:0,html_bodi:7,http:10,iexmarketdata:6,include_fundament:4,independ:[],index:[0,4],info:5,input:0,instanc:5,intradai:6,intraday_data_t:2,is_act:7,is_anonym:7,is_authent:7,is_correct_password:7,iter:2,join_trading_network:8,kind:5,king:[],kwarg:7,labor:[],last:7,last_logged_in:7,last_nam:7,lastnam:0,launch_serv:2,length:7,linear:9,link:0,list:[2,4,5,6,9],load_us:3,log:10,login:[0,7,10],login_requir:10,loginform:7,logon:8,logout:0,look:10,lookup:10,loss:9,luther:[],make:[],manual:[],markedforpar:4,market_data:[1,3],market_data_fundament:0,market_data_sp500:0,market_data_sp500_sector:0,market_data_spi:0,market_data_stock:0,market_data_us10i:0,market_period:2,market_status_req:8,market_status_rsp:8,martin:[],matketdata:[],memori:[],messag:[8,10],model:[1,3,9],model_back_test:0,model_probation_test:0,modul:1,msg:7,name:[5,6,7,9],neg:5,network:[1,3],new_cash:5,new_order_req:8,new_order_rsp:8,new_shar:5,none:[2,4,5,6,8,9],note:[],num_of_children:4,num_of_mut:4,num_of_par:4,number_of_qti:2,object:[4,5,6,7,8,9,10],observ:[],onc:[],one:6,onli:6,open1:9,open2:9,order_id:8,order_typ:8,org:10,our:9,output_fil:6,packag:1,packet:8,packettyp:8,page:[],pair:9,pair_info:9,pair_trad:[0,1,3],pair_trade_back_test:9,pair_trade_probation_test:9,panda:4,param:[5,6,9],part:[],password:[0,7],passwordfield:7,passwordform:7,pattern:10,perform:9,period:9,plaintext_password:7,platform:[0,10],pocoo:10,popul:4,populate_fundamental_data:6,populate_intraday_order_map:2,populate_intraday_stock_data:6,populate_order_t:2,populate_portfolio:4,populate_portfolio_by_symbol:4,populate_portfolio_fundament:4,populate_sp500_data:6,populate_stock_data:[6,9],portfolio:[0,1,3,5],posit:5,previous_working_dai:4,price:[5,8],price_df:4,price_mean:9,probation_testing_end_d:9,probation_testing_start_d:9,probationtesttrad:4,profit:9,profit_loss:9,properti:7,provid:5,qty1:9,qty2:9,qty:[8,9],quit_connect:8,quot:10,recipi:7,record:[5,9],regist:0,registered_on:7,registerform:7,registr:0,regress:9,render:10,repeat:7,requir:[0,7,10],resend_email_confirm:0,reset:0,reset_with_token:0,respons:3,result:9,retriev:6,role:7,rout:10,rtype:[],run:[],satisfi:7,schedul:2,search:[],second:9,sector:9,sell:[0,5],send_async_email:7,send_confirmation_email:7,send_email:7,send_msg:8,send_password_reset_email:7,sent:0,serial:8,server:1,server_down:8,server_down_req:8,server_down_rsp:8,server_rec:2,serverconfig:10,set:10,set_ev:8,set_market_statu:2,set_password:7,share:5,should:6,side:8,sim_auto_trad:0,sim_server_down:0,sim_server_up:0,sim_trad:[0,1,3],simpl:10,sp500:[6,9],sp500_sector:6,sp500_sector_list:[],sp500_sector_map:4,sp500_stock_map:[],sp500_symbol_map:4,spy:[4,6],spy_daily_return:[],spy_df:4,sql_stmt:5,sqlalchemi:7,sqlite:5,start:[2,6,9],start_dat:[4,6,9],start_server_process:0,start_tim:[],starttim:6,stat_arb:[1,3],statu:2,stdout:10,stock:[4,5,6,9],stock_list_req:8,stock_list_rsp:8,stock_pair:9,stock_req:8,stock_rsp:8,stockpair:9,store:6,str:[2,4,5,6,9],string:[5,6,9],stringfield:7,subject:7,submodul:[1,3],subpackag:1,support:7,symbol1:9,symbol2:9,symbol:[2,4,5,6,8,9,10],symbol_list:9,system:1,tabl:[5,6,9],table_list:5,table_nam:[5,6,9],take:0,technolog:9,test:9,text:10,text_bodi:7,textiowrapp:6,thanksgiv:[],thi:[0,5,9],threshold:9,through:0,ticker1:9,ticker2:9,ticker:[5,6,9],time_in_second:2,timestamp:5,todo:[],token:0,total:9,trade:[4,9],transact:5,trigger:[],tupl:4,two:9,uid:5,unboundfield:7,union:[5,9],updat:9,update_beta:9,update_market_data:[],update_market_statu:2,update_stock:4,update_trad:9,us10i:4,usd:10,used:[],user:[0,1,3,5,10],user_email:7,user_id:[3,7],user_password_chang:0,user_profil:0,util:[1,3,6],valid:7,valu:[8,9,10],veteran:[],viewdecor:10,volatil:9,wait_for_an_ev:8,want:9,washington:[],web:[],when:5,write:[9,10],wtform:7,year:[],yet:[]},titles:["app module","FRE_Platform","server module","system package","system.ai_modeling package","system.database package","system.market_data package","system.portfolio package","system.sim_trading package","system.stat_arb package","system.utility package"],titleterms:{ai_model:4,app:0,client:8,config:10,content:[3,4,5,6,7,8,9,10],databas:5,document:[],form:7,fre:[],fre_databas:5,fre_market_data:6,fre_platform:1,ga_portfolio:4,ga_portfolio_back_test:4,ga_portfolio_main:4,ga_portfolio_probation_test:4,ga_portfolio_select:4,helper:10,indic:[],main:[],market_data:6,model:7,modul:[0,2,3,4,5,6,7,8,9,10],network:8,packag:[3,4,5,6,7,8,9,10],pair_trad:9,platform:[],portfolio:7,server:2,sim_trad:8,stat_arb:9,submodul:[4,5,6,7,8,9,10],subpackag:3,system:[3,4,5,6,7,8,9,10],tabl:[],user:7,util:10,welcom:[]}})