#NEWLINE# def create_data_portal( env , tempdir , sim_params , sids , adjustment_reader = None ) : #NEWLINE# #INDENT# if ( sim_params . data_frequency == 'daily' ) : #NEWLINE# #INDENT# daily_path = write_daily_data ( tempdir , sim_params , sids ) #NEWLINE# equity_daily_reader = BcolzDailyBarReader ( daily_path ) #NEWLINE# return DataPortal ( env , equity_daily_reader = equity_daily_reader , adjustment_reader = adjustment_reader ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# minutes = env . minutes_for_days_in_range ( sim_params . first_open , sim_params . last_close ) #NEWLINE# minute_path = write_minute_data ( env , tempdir , minutes , sids ) #NEWLINE# equity_minute_reader = BcolzMinuteBarReader ( minute_path ) #NEWLINE# return DataPortal ( env , equity_minute_reader = equity_minute_reader , adjustment_reader = adjustment_reader )