├── doc ├── FIXME ├── model_overview_neato_hier.png ├── model_overview_neato_plain.png ├── README_FOR_APP ├── TODO └── WISH_LIST ├── public ├── favicon.ico ├── images │ ├── rails.png │ ├── bg_grad.jpg │ ├── spinner.gif │ ├── spinner1.gif │ ├── bg_button_a.gif │ ├── gblnav_left.gif │ ├── bg_button_span.gif │ ├── Shoppingcart_16x16.png │ └── Shoppingcart_alt_16x16.png ├── robots.txt └── stylesheets │ └── admin.css ├── tmp └── .gitignore ├── .gitignore ├── db ├── data │ ├── ticker.sql │ └── listing_categories.csv └── migrate │ ├── 20090211013128_create_fast_live_quotes.rb │ ├── 20090621180838_add_join_to_scan.rb │ ├── 20090523161209_add_low_to_daily_bar.rb │ ├── 20090630195749_add_order_to_scan.rb │ ├── 20081226223848_rename_table.rb │ ├── 20081226231635_add_active_to_ticker.rb │ ├── 20090326160102_add_week_to_position.rb │ ├── 20090621183035_add_result_to_factor.rb │ ├── 20090628162602_add_pass_to_position.rb │ ├── 20090822010347_add_prefetch_to_scan.rb │ ├── 20090826174851_undo_has_many_through_garbage.rb │ ├── 20090207204640_add_date_to_live_quote.rb │ ├── 20090403144352_rename_tp_to_scan.rb │ ├── 20090531043108_addlogr_to_posistion.rb │ ├── 20090606211312_add_short_to_position.rb │ ├── 20090625210728_add_table_name_to_scan.rb │ ├── 20091028202500_add_postfetch_to_scan.rb │ ├── 20081221004325_add_coeff_var_to_stat_values.rb │ ├── 20090310211259_add_validated_to_ticker.rb │ ├── 20090312145039_add_locked_flag_to_ticker.rb │ ├── 20090330163411_add_index_to_strategy.rb │ ├── 20090523161236_add_low_to_intra_day_bar.rb │ ├── 20081230211500_rename_listing_table.rb │ ├── 20090112002225_add_index_to_aggregate.rb │ ├── 20090112175621_add_avg_volume_to_aggregate.rb │ ├── 20090826030109_remove_from_positions.rb │ ├── 20090308043254_change_ticker_index_to_unique.rb │ ├── 20090611141759_rename_interval.rb │ ├── 20090804171022_add_exit_pass_to_positions.rb │ ├── 20090810235140_add_last_seq_to_stock_watch.rb │ ├── 20091005222651_add_adj_close_to_yahoo_bar.rb │ ├── 20090527162442_add_index_to_daily_bars.rb │ ├── 20090528233546_create_sectors.rb │ ├── 20090610015332_rename_rety_count.rb │ ├── 20090618213332_add_tid_to_study_result.rb │ ├── 20090726180014_add_close_flag_to_tda_position.rb │ ├── 20090815165411_add_stale_date_to_watch_list.rb │ ├── 20090924181907_add_sim_position_to_order.rb │ ├── 20091028012051_add_delisted_to_ticker.rb │ ├── 20090103173409_add_dormant_flag_to_ticker.rb │ ├── 20090505155855_rename_normalize.rb │ ├── 20090726160107_add_std_devto_watch_list.rb │ ├── 20090727032303_add_num_samples_to_watch_list.rb │ ├── 20090729170007_rename_update_at.rb │ ├── 20090824160651_rename_openned_at.rb │ ├── 20090906030133_add_trigger_at_to_positions.rb │ ├── 20081227191313_add_index_to_live_quotes.rb │ ├── 20090112175259_add_sample_count_to_aggregate.rb │ ├── 20090207202449_add_index2_to_aggregates.rb │ ├── 20090210230614_create_var_aggregates.rb │ ├── 20090306193422_add_alias_to_tickers.rb │ ├── 20090326161245_add_index_to_position.rb │ ├── 20090528233606_create_industries.rb │ ├── 20090612175135_rename_intra_archive.rb │ ├── 20090617190455_create_indicators.rb │ ├── 20090817185325_rename_num_shares.rb │ ├── 20090818213209_rename_opened_on_date.rb │ ├── 20090906192715_add_trigger_price_to_position.rb │ ├── 20090206183913_add_unique_key_to_aggregates.rb │ ├── 20090207205520_add_index2_to_live_quotes.rb │ ├── 20090826160215_drop_vestigial_tables.rb │ ├── 20090917220410_add_interpolated_to_intra_day_bar.rb │ ├── 20090301044945_add_missed_minutes_to_ticker.rb │ ├── 20090531211334_add_accum_volume_to_intra_day_bar.rb │ ├── 20090804170603_add_indicator_id_to_position.rb │ ├── 20090618210756_reanme_to_factor_id.rb │ ├── 20090719164751_create_ta_specs.rb │ ├── 20090906180655_add_trigger_strategy_to_positions.rb │ ├── 20081219012557_remove_updated_at_from_real_time_quotes.rb │ ├── 20081221002851_add_index_to_daily_closes.rb │ ├── 20081225165149_remove_created_at_from_real_time_quote.rb │ ├── 20090331042022_add_description_to_ticker_population.rb │ ├── 20090605144414_rename_start_time_in_snapshots.rb │ ├── 20081228175347_create_index_on_daily_closes.rb │ ├── 20090709170347_add_seq_to_intra_day_bar.rb │ ├── 20090210002335_create_pimary_key_ids.rb │ ├── 20090217201836_create_contract_types.rb │ ├── 20090403161440_create_scans_tickers.rb │ ├── 20090618183228_add_index_to_study.rb │ ├── 20090111231534_add_columns_to_aggregate.rb │ ├── 20090403160358_create_positions_scans.rb │ ├── 20090506052559_remove_positions_scans.rb │ ├── 20090217200947_create_portfolios.rb │ ├── 20090307022020_create_derived_value_types.rb │ ├── 20090711171320_create_position_stats.rb │ ├── 20090817002435_add_closed_to_position.rb │ ├── 20090326154625_create_strategies.rb │ ├── 20090618030500_create_study_results.rb │ ├── 20090630053955_rename_risk_factor.rb │ ├── 20090909011746_drop_scans_triggers.rb │ ├── 20081230031957_rework_live_quotes.rb │ ├── 20090506052012_create_positions_strategies.rb │ ├── 20090617191156_create_studies.rb │ ├── 20090821150720_reog_columns_watch_list.rb │ ├── 20090826024600_create_exit_strategies.rb │ ├── 20090617191640_create_indicators_studies.rb │ ├── 20090826024539_create_entry_strategies.rb │ ├── 20090826185948_create_entry_stragies_scans.rb │ ├── 20090506055841_create_scans_strategies.rb │ ├── 20090810172722_add_entry_date_to_watch_list.rb │ ├── 20091011221634_add_adj_close_to_daily_bar.rb │ ├── 20090330162336_add_params_yaml_to_strategy.rb │ ├── 20090826144841_create_backtest_exits.rb │ ├── 20081231002802_rename_cols_in_daily_close.rb │ ├── 20090826144607_create_backtest_entries.rb │ ├── 20090330155610_create_ticker_populations.rb │ ├── 20090906171310_create_trigger_strategies.rb │ ├── 20090907025059_augment_position_index.rb │ ├── 20090330160603_change_portfolio_to_population.rb │ ├── 20090301040911_create_bar_tables.rb │ ├── 20091016185148_create_splits.rb │ ├── 20090310213733_add_foreign_key_to_daily_closes.rb │ ├── 20090906181342_create_trigger_stragegy_scans.rb │ ├── 20090719170151_create_ta_series.rb │ ├── 20090907020132_create_trigger_scans_join_table.rb │ ├── 20090311210559_move_name_field_to_tickers.rb │ ├── 20090904021724_drop_old_date_on_daily_bars.rb │ ├── 20090307022324_create_derived_values.rb │ ├── 20090817220956_change_belong_to_has_one_wach_list.rb │ ├── 20090819163021_rename_macd_in_watch_list.rb │ ├── 20091026204637_create_ledger_txns.rb │ ├── 20090618181203_add_version_to_study.rb │ ├── 20091029212126_create_sim_summaries.rb │ ├── 20081230225836_create_plot_attributes.rb │ ├── 20090729181214_add_columns_to_watch_list.rb │ ├── 20081217012719_add_returns_to_daily_close.rb │ ├── 20090528012055_add_triggers_to_position.rb │ ├── 20081231001734_create_plot_types.rb │ ├── 20090823015126_create_position_series.rb │ ├── 20090608195510_add_open_flag_to_strategies.rb │ ├── 20100123024049_create_ann_inputs.rb │ ├── 20100205165537_create_indicator_values.rb │ └── 20081227180640_create_aggregates.rb ├── vendor └── plugins │ ├── delayed_job │ ├── VERSION │ ├── init.rb │ ├── tasks │ │ └── jobs.rake │ ├── generators │ │ └── delayed_job │ │ │ ├── templates │ │ │ └── script │ │ │ └── delayed_job_generator.rb │ └── spec │ │ └── story_spec.rb │ ├── make_resourceful │ ├── VERSION │ ├── rdoc │ │ └── created.rid │ ├── init.rb │ └── generators │ │ └── resourceful_scaffold │ │ └── templates │ │ ├── model.rb │ │ ├── controller.rb │ │ ├── helper.rb │ │ ├── unit_test.rb │ │ ├── view__form.haml │ │ ├── fixtures.yml │ │ ├── view_new.haml │ │ ├── view_index.haml │ │ ├── view_edit.haml │ │ ├── migration.rb │ │ └── view_show.haml │ ├── squirrel │ ├── .gitignore │ └── test │ │ ├── fixtures │ │ ├── tags.yml │ │ ├── companies.yml │ │ └── users.yml │ │ └── database.yml │ ├── will_paginate │ ├── init.rb │ ├── .gitignore │ ├── test │ │ ├── fixtures │ │ │ ├── user.rb │ │ │ ├── admin.rb │ │ │ ├── projects.yml │ │ │ ├── reply.rb │ │ │ ├── developers_projects.yml │ │ │ └── topic.rb │ │ ├── console │ │ └── lib │ │ │ └── load_fixtures.rb │ ├── examples │ │ └── apple-circle.gif │ └── lib │ │ └── will_paginate │ │ └── version.rb │ ├── livevalidation │ ├── install.rb │ ├── uninstall.rb │ └── init.rb │ ├── visualize_models │ ├── ChangeLog │ └── tasks │ │ └── visualize_models_tasks.rake │ ├── redhillonrails_core │ ├── init.rb │ ├── lib │ │ └── red_hill_consulting │ │ │ └── core │ │ │ └── active_record │ │ │ └── connection_adapters │ │ │ ├── mysql_column.rb │ │ │ ├── index_definition.rb │ │ │ └── sqlite3_adapter.rb │ └── tasks │ │ └── db │ │ └── comments.rake │ ├── dependent_protect │ ├── init.rb │ └── README │ ├── exception_notification │ └── lib │ │ └── exception_notifier │ │ └── views │ │ └── exception_notifier │ │ ├── _backtrace.html.erb │ │ ├── _title.html.erb │ │ ├── _session.html.erb │ │ ├── _request.html.erb │ │ └── _environment.html.erb │ ├── foreign_key_migrations │ ├── init.rb │ ├── install.rb │ ├── about.yml │ ├── generators │ │ └── foreign_key_migration │ │ │ └── templates │ │ │ └── migration.rb │ └── lib │ │ └── foreign_key_migrations.rb │ ├── auto_complete │ └── init.rb │ ├── transactional_migrations │ ├── init.rb │ ├── about.yml │ └── lib │ │ └── transactional_migrations.rb │ ├── acl_system2 │ ├── test │ │ └── test_helper.rb │ ├── init.rb │ └── lib │ │ └── caboose │ │ └── role_handler.rb │ └── annotate_models │ └── tasks │ └── annotate_models_tasks.rake ├── lib ├── td_ameritrade │ └── ext │ │ └── .gitignore ├── tests │ └── eventmachine │ │ ├── test │ │ └── echo ├── talib │ ├── ext │ │ ├── talib.so │ │ └── extconf.rb │ ├── include-1.8.7 │ │ └── rb_gsl_dirac.h │ └── include-1.9.1 │ │ └── rb_gsl_dirac.h ├── gplot.dem ├── gplot2.dem └── em-jack │ └── lib │ ├── em-jack │ └── errors.rb │ └── em-jack.rb ├── app └── views │ ├── sectors │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _sector.html.haml │ ├── indicators │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _indicator.html.haml │ ├── industries │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _industry.html.haml │ ├── contract_types │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _contract_type.html.haml │ ├── derived_value_types │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _derived_value_type.html.haml │ ├── historical_attributes │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── listing_categories │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _listing_category.html.haml │ ├── portfolios │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _portfolio.html.haml │ ├── studies │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── _study.html.haml │ ├── entry_strategies │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── exit_strategies │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── trigger_strategies │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── indicator_values │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── splits │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── background_tasks │ └── dashboard.html.erb │ ├── position_series │ ├── _form.html.haml │ ├── new.html.haml │ ├── index.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── exchanges │ ├── _form.html.haml │ ├── new.html.haml │ ├── index.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── scans │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── ledger_txns │ ├── _form.html.haml │ ├── new.html.haml │ ├── index.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── notifier │ └── csv_notification.erb │ ├── sim_summaries │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ ├── plot_attributes │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ ├── daily_bars │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ ├── plot_types │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ ├── live_quotes │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── intra_day_bars │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ ├── intra_snapshots │ ├── _form.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ ├── strategies │ ├── _form.html.haml │ ├── index.html.haml │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── orders │ ├── new.html.haml │ ├── edit.html.haml │ ├── _form.html.haml │ ├── show.html.haml │ └── index.html.haml │ ├── tickers │ ├── new.html.haml │ ├── _form.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ ├── plot.html.haml │ └── launch_pad.html.haml │ ├── positions │ ├── new.html.haml │ ├── edit.html.haml │ ├── _form.html.haml │ ├── show.html.haml │ └── index.html.haml │ ├── sim_jobs │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── snapshots │ ├── new.html.haml │ ├── _form.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ └── index.html.haml │ ├── aggregations │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ ├── _form.html.haml │ └── index.html.haml │ ├── daily_closes │ ├── new.html.haml │ ├── _form.html.haml │ ├── edit.html.haml │ ├── _plot_form.html.haml │ ├── show.html.haml │ ├── index.html.haml │ ├── plot_remote.html.haml │ └── plot_local.html.haml │ ├── stat_values │ ├── new.html.haml │ ├── edit.html.haml │ └── show.html.haml │ ├── watch_lists │ ├── new.html.haml │ ├── edit.html.haml │ ├── _form.html.haml │ └── show.html.haml │ ├── sim_positions │ ├── new.html.haml │ ├── edit.html.haml │ ├── show.html.haml │ ├── _form.html.haml │ └── index.html.haml │ ├── tda_positions │ ├── new.html.haml │ ├── close.html.haml │ ├── edit.html.haml │ ├── index.html.haml │ └── show.html.haml │ └── current_listing │ ├── edit.html.haml │ └── show.html.haml ├── log └── .gitignore ├── script ├── about ├── plugin ├── runner ├── server ├── console ├── dbconsole ├── destroy ├── generate ├── process │ ├── reaper │ ├── spawner │ └── inspector ├── performance │ ├── profiler │ ├── request │ └── benchmarker ├── crontab ├── parake └── delayed_job ├── Capfile ├── config ├── Capfile └── initializers │ ├── mime_types.rb │ └── inflections.rb ├── test ├── unit │ ├── order_test.rb │ ├── sector_test.rb │ ├── splits_test.rb │ ├── study_test.rb │ ├── ticker_test.rb │ ├── daily_bar_test.rb │ ├── exchange_test.rb │ ├── indicator_test.rb │ ├── industry_test.rb │ ├── listing_test.rb │ ├── plot_type_test.rb │ ├── portfolio_test.rb │ ├── position_test.rb │ ├── sim_jobs_test.rb │ ├── snapshot_test.rb │ ├── strategy_test.rb │ ├── aggregation_test.rb │ ├── daily_close_test.rb │ ├── daily_return_test.rb │ ├── ledger_txn_test.rb │ ├── live_quote_test.rb │ ├── sim_position_test.rb │ ├── sim_summary_test.rb │ ├── stat_value_test.rb │ ├── tda_position_test.rb │ ├── watch_list_test.rb │ ├── contract_type_test.rb │ ├── entry_strategy_test.rb │ ├── exit_strategy_test.rb │ ├── intra_day_bar_test.rb │ ├── intra_snapshot_test.rb │ ├── indicator_value_test.rb │ ├── listing_category_test.rb │ ├── plot_attributes_test.rb │ ├── position_series_test.rb │ ├── ticker_population_test.rb │ ├── trigger_strategy_test.rb │ ├── derived_value_type_test.rb │ ├── notifier_test.rb │ ├── ta_spec_test.rb │ ├── aggregate_test.rb │ ├── ann_input_test.rb │ ├── historical_attribute_test.rb │ ├── ta_series_test.rb │ ├── derived_value_test.rb │ ├── scans_tickers_test.rb │ ├── study_result_test.rb │ ├── var_aggregate_test.rb │ ├── backtest_entries_test.rb │ ├── backtest_exits_test.rb │ ├── btest_position_test.rb │ ├── fast_live_quotes_test.rb │ ├── position_stats_test.rb │ ├── positions_scans_test.rb │ ├── rsi_target_study_test.rb │ ├── scans_strategies_test.rb │ ├── indicators_studies_test.rb │ ├── positions_strategies_test.rb │ ├── temp_position_template_test.rb │ ├── entry_strategies_positions_test.rb │ ├── rail_time_quote_worker_test.rb │ └── daily_query_worker_worker_test.rb ├── fixtures │ ├── entry_strategies_positions.yml │ ├── sectors.yml │ ├── indicators.yml │ ├── industries.yml │ ├── contract_types.yml │ ├── derived_value_types.yml │ ├── historical_attributes.yml │ ├── listing_categories.yml │ ├── scans_tickers.yml │ ├── positions_scans.yml │ ├── scans_strategies.yml │ ├── positions_strategies.yml │ ├── fast_live_quotes.yml │ └── ta_specs.yml └── functional │ └── background_tasks_controller_test.rb └── Rakefile /doc/FIXME: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.gitignore: -------------------------------------------------------------------------------- 1 | *.* 2 | 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gif 2 | *.pdf 3 | TAGS 4 | 5 | -------------------------------------------------------------------------------- /db/data/ticker.sql: -------------------------------------------------------------------------------- 1 | select symbol from tickers -------------------------------------------------------------------------------- /vendor/plugins/delayed_job/VERSION: -------------------------------------------------------------------------------- 1 | 1.8.0 2 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/VERSION: -------------------------------------------------------------------------------- 1 | 0.2.3.0 -------------------------------------------------------------------------------- /lib/td_ameritrade/ext/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | -------------------------------------------------------------------------------- /app/views/sectors/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /log/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.csv 3 | *.bz2 4 | *.xls 5 | -------------------------------------------------------------------------------- /vendor/plugins/squirrel/.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | debug.log 3 | -------------------------------------------------------------------------------- /app/views/indicators/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /app/views/industries/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /app/views/contract_types/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/init.rb: -------------------------------------------------------------------------------- 1 | require 'will_paginate' 2 | -------------------------------------------------------------------------------- /app/views/derived_value_types/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /app/views/historical_attributes/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /app/views/listing_categories/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | -------------------------------------------------------------------------------- /vendor/plugins/livevalidation/install.rb: -------------------------------------------------------------------------------- 1 | # Install hook code here 2 | -------------------------------------------------------------------------------- /vendor/plugins/livevalidation/uninstall.rb: -------------------------------------------------------------------------------- 1 | # Uninstall hook code here 2 | -------------------------------------------------------------------------------- /vendor/plugins/visualize_models/ChangeLog: -------------------------------------------------------------------------------- 1 | 8-april-2006: 2 | Initial release -------------------------------------------------------------------------------- /lib/tests/eventmachine/test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./consumer.rb & 3 | ./producer.rb 4 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/.gitignore: -------------------------------------------------------------------------------- 1 | /doc 2 | /rails 3 | *.gem 4 | /coverage 5 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/rdoc/created.rid: -------------------------------------------------------------------------------- 1 | Wed, 08 Oct 2008 18:17:06 -0700 2 | -------------------------------------------------------------------------------- /vendor/plugins/delayed_job/init.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/lib/delayed_job' 2 | -------------------------------------------------------------------------------- /vendor/plugins/livevalidation/init.rb: -------------------------------------------------------------------------------- 1 | require 'live_validations' 2 | require 'form_helpers' -------------------------------------------------------------------------------- /app/views/portfolios/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.text_field :initial_value 3 | -------------------------------------------------------------------------------- /vendor/plugins/delayed_job/tasks/jobs.rake: -------------------------------------------------------------------------------- 1 | require File.join(File.dirname(__FILE__), 'tasks') 2 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/fixtures/user.rb: -------------------------------------------------------------------------------- 1 | class User < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /lib/talib/ext/talib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/lib/talib/ext/talib.so -------------------------------------------------------------------------------- /public/images/rails.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/rails.png -------------------------------------------------------------------------------- /public/images/bg_grad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/bg_grad.jpg -------------------------------------------------------------------------------- /public/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/spinner.gif -------------------------------------------------------------------------------- /public/images/spinner1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/spinner1.gif -------------------------------------------------------------------------------- /public/images/bg_button_a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/bg_button_a.gif -------------------------------------------------------------------------------- /public/images/gblnav_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/gblnav_left.gif -------------------------------------------------------------------------------- /vendor/plugins/redhillonrails_core/init.rb: -------------------------------------------------------------------------------- 1 | require 'redhillonrails_core' unless defined?(RedHillConsulting::Core) 2 | -------------------------------------------------------------------------------- /app/views/studies/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.date_select :start_date 3 | = f.date_select :end_date 4 | -------------------------------------------------------------------------------- /script/about: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/about' 4 | -------------------------------------------------------------------------------- /script/plugin: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/plugin' 4 | -------------------------------------------------------------------------------- /script/runner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/runner' 4 | -------------------------------------------------------------------------------- /script/server: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/server' 4 | -------------------------------------------------------------------------------- /app/views/entry_strategies/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.text_field :params 3 | = f.text_field :description 4 | -------------------------------------------------------------------------------- /app/views/exit_strategies/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.text_field :params 3 | = f.text_field :description 4 | -------------------------------------------------------------------------------- /app/views/trigger_strategies/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.text_field :params 3 | = f.text_field :description 4 | -------------------------------------------------------------------------------- /doc/model_overview_neato_hier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/doc/model_overview_neato_hier.png -------------------------------------------------------------------------------- /doc/model_overview_neato_plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/doc/model_overview_neato_plain.png -------------------------------------------------------------------------------- /public/images/bg_button_span.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/bg_button_span.gif -------------------------------------------------------------------------------- /script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/console' 4 | -------------------------------------------------------------------------------- /script/dbconsole: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/dbconsole' 4 | -------------------------------------------------------------------------------- /script/destroy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/destroy' 4 | -------------------------------------------------------------------------------- /script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../config/boot' 3 | require 'commands/generate' 4 | -------------------------------------------------------------------------------- /vendor/plugins/dependent_protect/init.rb: -------------------------------------------------------------------------------- 1 | require 'dependent_protect' 2 | ActiveRecord::Base.send :include, DependentProtect 3 | -------------------------------------------------------------------------------- /app/views/indicator_values/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :indicator_id 2 | = f.text_field :datetime 3 | = f.text_field :value 4 | -------------------------------------------------------------------------------- /public/images/Shoppingcart_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/Shoppingcart_16x16.png -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/init.rb: -------------------------------------------------------------------------------- 1 | require 'resourceful/maker' 2 | 3 | ActionController::Base.extend Resourceful::Maker 4 | -------------------------------------------------------------------------------- /app/views/splits/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.date_select :date 3 | = f.text_field :from 4 | = f.text_field :to 5 | -------------------------------------------------------------------------------- /lib/gplot.dem: -------------------------------------------------------------------------------- 1 | set size 1,1 2 | set origin 0,0 3 | set multiplot layout 2,1 scale 1,1 4 | plot sin(x) 5 | plot sin(x)/x 6 | unset multiplot -------------------------------------------------------------------------------- /vendor/plugins/dependent_protect/README: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/vendor/plugins/dependent_protect/README -------------------------------------------------------------------------------- /public/images/Shoppingcart_alt_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/public/images/Shoppingcart_alt_16x16.png -------------------------------------------------------------------------------- /script/process/reaper: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/reaper' 4 | -------------------------------------------------------------------------------- /script/process/spawner: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/spawner' 4 | -------------------------------------------------------------------------------- /vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_backtrace.html.erb: -------------------------------------------------------------------------------- 1 | <%=raw @backtrace.join "\n" %> 2 | -------------------------------------------------------------------------------- /vendor/plugins/foreign_key_migrations/init.rb: -------------------------------------------------------------------------------- 1 | require 'foreign_key_migrations' unless defined?(RedHillConsulting::ForeignKeyMigrations) 2 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/model.rb: -------------------------------------------------------------------------------- 1 | class <%= class_name %> < ActiveRecord::Base 2 | end 3 | -------------------------------------------------------------------------------- /lib/gplot2.dem: -------------------------------------------------------------------------------- 1 | set multiplot 2 | set origin 0,.33 3 | set size 1,0.66 4 | plot sin(x) 5 | set size 1,.33 6 | set origin 0,0 7 | plot sin(x)/x 8 | -------------------------------------------------------------------------------- /script/process/inspector: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/process/inspector' 4 | -------------------------------------------------------------------------------- /vendor/plugins/auto_complete/init.rb: -------------------------------------------------------------------------------- 1 | ActionController::Base.send :include, AutoComplete 2 | ActionController::Base.helper AutoCompleteMacrosHelper -------------------------------------------------------------------------------- /vendor/plugins/transactional_migrations/init.rb: -------------------------------------------------------------------------------- 1 | require 'transactional_migrations' unless defined?(RedHillConsulting::TransactionalMigrations) 2 | -------------------------------------------------------------------------------- /app/views/background_tasks/dashboard.html.erb: -------------------------------------------------------------------------------- 1 |

BackgroundTasks#dashboard

2 |

Find me in app/views/background_tasks/dashboard.html.erb

3 | -------------------------------------------------------------------------------- /script/performance/profiler: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/profiler' 4 | -------------------------------------------------------------------------------- /script/performance/request: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/request' 4 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/fixtures/admin.rb: -------------------------------------------------------------------------------- 1 | class Admin < User 2 | has_many :companies, :finder_sql => 'SELECT * FROM companies' 3 | end 4 | -------------------------------------------------------------------------------- /app/views/position_series/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :position_id 2 | = f.date_select :date 3 | = f.table_select :indicator_id 4 | = f.text_field :value 5 | -------------------------------------------------------------------------------- /lib/em-jack/lib/em-jack/errors.rb: -------------------------------------------------------------------------------- 1 | module EMJack 2 | class Disconnected < RuntimeError 3 | end 4 | 5 | class InvalidCommand < RuntimeError 6 | end 7 | end -------------------------------------------------------------------------------- /script/performance/benchmarker: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require File.dirname(__FILE__) + '/../../config/boot' 3 | require 'commands/performance/benchmarker' 4 | -------------------------------------------------------------------------------- /Capfile: -------------------------------------------------------------------------------- 1 | load 'deploy' if respond_to?(:namespace) # cap2 differentiator 2 | Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } 3 | load 'config/deploy' -------------------------------------------------------------------------------- /vendor/plugins/squirrel/test/fixtures/tags.yml: -------------------------------------------------------------------------------- 1 | first: 2 | id: 1 3 | name: Stuff 4 | second: 5 | id: 2 6 | name: Rails 7 | third: 8 | id: 3 9 | name: Nothing -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/examples/apple-circle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kpnolan/stock_db_capture/HEAD/vendor/plugins/will_paginate/examples/apple-circle.gif -------------------------------------------------------------------------------- /app/views/exchanges/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :symbol 2 | = f.text_field :name 3 | = f.text_field :country 4 | = f.text_field :currency 5 | = f.text_field :timezone 6 | -------------------------------------------------------------------------------- /app/views/scans/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.date_select :start_date 3 | = f.date_select :end_date 4 | = f.text_area :conditions, :cols => 50, :rows => 4 5 | -------------------------------------------------------------------------------- /config/Capfile: -------------------------------------------------------------------------------- 1 | load 'deploy' if respond_to?(:namespace) # cap2 differentiator 2 | Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } 3 | load 'config/deploy' -------------------------------------------------------------------------------- /app/views/ledger_txns/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :amount 2 | = f.datetime_select :date 3 | = f.text_field :type 4 | = f.table_select :order_id 5 | = f.text_field :msg 6 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/fixtures/projects.yml: -------------------------------------------------------------------------------- 1 | active_record: 2 | id: 1 3 | name: Active Record 4 | action_controller: 5 | id: 2 6 | name: Active Controller 7 | -------------------------------------------------------------------------------- /app/views/notifier/csv_notification.erb: -------------------------------------------------------------------------------- 1 | Hi Lewis, 2 |
3 | Here are the new WatchList entries for today. 4 |
5 |
6 | Namaste` 7 |
8 | Kevin 9 | 10 | -------------------------------------------------------------------------------- /db/migrate/20090211013128_create_fast_live_quotes.rb: -------------------------------------------------------------------------------- 1 | class CreateFastLiveQuotes < ActiveRecord::Migration 2 | def self.up 3 | end 4 | 5 | def self.down 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/order_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class OrderTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/sector_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SectorTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/splits_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SplitsTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/study_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class StudyTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/ticker_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class TickerTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/daily_bar_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class DailyBarTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/exchange_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ExchangeTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/indicator_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class IndicatorTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/industry_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class IndustryTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/listing_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ListingTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/plot_type_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class PlotTypeTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/portfolio_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class PortfolioTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/position_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class PositionTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/sim_jobs_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SimJobsTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/snapshot_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SnapshotTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/strategy_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class StrategyTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/plugins/squirrel/test/fixtures/companies.yml: -------------------------------------------------------------------------------- 1 | first: 2 | id: 1 3 | name: thoughtbot, inc. 4 | second: 5 | id: 2 6 | name: Widgets, Inc. 7 | third: 8 | id: 3 9 | name: Google -------------------------------------------------------------------------------- /test/unit/aggregation_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class AggregationTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/daily_close_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class DailyCloseTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/daily_return_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class DailyReturnTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/ledger_txn_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class LedgerTxnTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/live_quote_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class LiveQuoteTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/sim_position_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SimPositionTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/sim_summary_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class SimSummaryTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/stat_value_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class StatValueTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/tda_position_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class TdaPositionTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/watch_list_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class WatchListTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/plugins/foreign_key_migrations/install.rb: -------------------------------------------------------------------------------- 1 | puts "WARNING: You also need to install redhillonrails_core" unless File.exists?(File.join(File.dirname(__FILE__), "..", "redhillonrails_core")) 2 | -------------------------------------------------------------------------------- /test/unit/contract_type_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ContractTypeTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/entry_strategy_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class EntryStrategyTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/exit_strategy_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ExitStrategyTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/intra_day_bar_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class IntraDayBarTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/intra_snapshot_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class IntraSnapshotTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/indicator_value_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class IndicatorValueTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/listing_category_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class ListingCategoryTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/plot_attributes_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class PlotAttributesTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/position_series_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class PositionSeriesTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/ticker_population_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class TickerPopulationTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/trigger_strategy_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class TriggerStrategyTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_title.html.erb: -------------------------------------------------------------------------------- 1 | ------------------------------- 2 | <%=raw title.to_s.humanize %>: 3 | ------------------------------- 4 | -------------------------------------------------------------------------------- /app/views/sim_summaries/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.date_select :sim_date 2 | = f.text_field :positions_held 3 | = f.text_field :positions_available 4 | = f.text_field :portfolio_value 5 | = f.text_field :cash_balance 6 | -------------------------------------------------------------------------------- /test/unit/derived_value_type_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class DerivedValueTypeTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/notifier_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class NotifierTest < ActionMailer::TestCase 4 | # replace this with your real tests 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/ta_spec_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TaSpecTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/views/plot_attributes/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.table_select :symbol_id 3 | = f.text_field :type 4 | = f.datetime_select :anchor_date 5 | = f.text_field :period 6 | = f.text_field :attributes 7 | -------------------------------------------------------------------------------- /test/unit/aggregate_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class AggregateTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/ann_input_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class AnnInputTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/historical_attribute_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | 3 | class HistoricalAttributeTest < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/unit/ta_series_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TaSeriesTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/derived_value_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class DerivedValueTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/scans_tickers_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ScansTickersTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/study_result_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class StudyResultTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/var_aggregate_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class VarAggregateTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/views/daily_bars/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.date_select :date 3 | = f.text_field :opening 4 | = f.text_field :close 5 | = f.text_field :high 6 | = f.text_field :volume 7 | = f.text_field :logr 8 | -------------------------------------------------------------------------------- /app/views/sectors/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing sectors 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'sector', :collection => current_objects 7 | 8 | = link_to 'New sector', new_object_path 9 | -------------------------------------------------------------------------------- /test/unit/backtest_entries_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class BacktestEntriesTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/backtest_exits_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class BacktestExitsTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/btest_position_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class BtestPositionTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/fast_live_quotes_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class FastLiveQuoteTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/position_stats_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PositionStatsTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/positions_scans_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PositionsScansTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/rsi_target_study_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class RsiTargetStudyTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/scans_strategies_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class ScansStrategiesTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/controller.rb: -------------------------------------------------------------------------------- 1 | class <%= controller_class_name %>Controller < ApplicationController 2 | make_resourceful do 3 | actions :all 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/unit/indicators_studies_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class IndicatorsStudiesTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/views/indicators/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing indicators 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'indicator', :collection => current_objects 7 | 8 | = link_to 'New indicator', new_object_path 9 | -------------------------------------------------------------------------------- /app/views/industries/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing industries 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'industry', :collection => current_objects 7 | 8 | = link_to 'New industry', new_object_path 9 | -------------------------------------------------------------------------------- /doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /test/unit/positions_strategies_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PositionsStrategiesTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/lib/will_paginate/version.rb: -------------------------------------------------------------------------------- 1 | module WillPaginate 2 | module VERSION 3 | MAJOR = 2 4 | MINOR = 3 5 | TINY = 5 6 | 7 | STRING = [MAJOR, MINOR, TINY].join('.') 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/plot_types/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.text_field :source_model 3 | = f.text_field :method 4 | = f.text_field :time_class 5 | = f.text_field :resolution 6 | = f.text_field :inputs 7 | = f.text_field :num_outputs 8 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-Agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /test/unit/temp_position_template_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class TempPositionTemplateTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/unit/entry_strategies_positions_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class EntryStrategiesPositionsTest < ActiveSupport::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/plugins/acl_system2/test/test_helper.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../lib/caboose/logic_parser' 2 | require File.dirname(__FILE__) + '/../lib/caboose/role_handler' 3 | require File.dirname(__FILE__) + '/../lib/caboose/access_control' -------------------------------------------------------------------------------- /app/views/live_quotes/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.text_field :last_trade 3 | = f.datetime_select :last_trade_time 4 | = f.text_field :change_points 5 | = f.text_field :r 6 | = f.text_field :logr 7 | = f.text_field :volume 8 | -------------------------------------------------------------------------------- /script/crontab: -------------------------------------------------------------------------------- 1 | RAILS_ENV=production 2 | 30 11 * * 1-5 cd /work/railsapps/stock_db_capture && /usr/local/bin/rake active_trader:update_history 3 | 30 01 * * 2-6 cd /work/railsapps/stock_db_capture && /usr/local/bin/rake active_trader:update_intrday 4 | -------------------------------------------------------------------------------- /script/parake: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright © Kevin P. Nolan 2009 All Rights Reserved. 3 | ((i = 0)) 4 | while (( i < $2 )) 5 | do 6 | echo rake $1 7 | nice rake $1 PROC_ID=$i PROC_CNT=$2 & 8 | ((i += 1)) 9 | done 10 | echo $2 Spawned 11 | -------------------------------------------------------------------------------- /app/views/contract_types/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing contract_types 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'contract_type', :collection => current_objects 7 | 8 | = link_to 'New contract_type', new_object_path 9 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | # Mime::Type.register_alias "text/html", :iphone 6 | -------------------------------------------------------------------------------- /db/migrate/20090621180838_add_join_to_scan.rb: -------------------------------------------------------------------------------- 1 | class AddJoinToScan < ActiveRecord::Migration 2 | def self.up 3 | add_column :scans, :join, :string 4 | end 5 | 6 | def self.down 7 | remove_column :scans, :join 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/fixtures/entry_strategies_positions.yml: -------------------------------------------------------------------------------- 1 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 2 | 3 | one: 4 | entry_strategy_id: 1 5 | position_id: 1 6 | 7 | two: 8 | entry_strategy_id: 1 9 | position_id: 1 10 | -------------------------------------------------------------------------------- /test/functional/background_tasks_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class BackgroundTasksControllerTest < ActionController::TestCase 4 | # Replace this with your real tests. 5 | test "the truth" do 6 | assert true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/plugins/foreign_key_migrations/about.yml: -------------------------------------------------------------------------------- 1 | author: simon@redhillconsulting.com.au 2 | summary: Automatically generates foreign-key constraints when creating tables. 3 | homepage: http://www.redhillonrails.org 4 | license: MIT 5 | rails_version: EDGE 6 | -------------------------------------------------------------------------------- /app/views/intra_day_bars/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.text_field :interval 3 | = f.text_field :bartime 4 | = f.text_field :opening 5 | = f.text_field :close 6 | = f.text_field :high 7 | = f.text_field :volume 8 | = f.text_field :delta 9 | -------------------------------------------------------------------------------- /app/views/intra_snapshots/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.text_field :interval 3 | = f.text_field :start_time 4 | = f.text_field :opening 5 | = f.text_field :close 6 | = f.text_field :high 7 | = f.text_field :low 8 | = f.text_field :volume 9 | -------------------------------------------------------------------------------- /app/views/strategies/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :name 2 | = f.text_field :open_description 3 | = f.text_field :close_description 4 | = f.text_area :open_params_yaml, :cols => 30, :rows => 7 5 | = f.text_area :close_params_yaml, :cols => 30, :rows => 7 6 | -------------------------------------------------------------------------------- /app/views/listing_categories/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing listing_categories 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'listing_category', :collection => current_objects 7 | 8 | = link_to 'New listing_category', new_object_path 9 | -------------------------------------------------------------------------------- /db/data/listing_categories.csv: -------------------------------------------------------------------------------- 1 | Consumer Discretionary 2 | Consumer Staples 3 | Energy 4 | Financials 5 | Health Care 6 | Industrials 7 | Information Technology 8 | Materials 9 | Telecommunications Services 10 | Utilities 11 | Sp500 12 | DowJones 13 | 14 | -------------------------------------------------------------------------------- /db/migrate/20090523161209_add_low_to_daily_bar.rb: -------------------------------------------------------------------------------- 1 | class AddLowToDailyBar < ActiveRecord::Migration 2 | def self.up 3 | add_column :daily_bars, :low, :float 4 | end 5 | 6 | def self.down 7 | remove_column :daily_bars, :low 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090630195749_add_order_to_scan.rb: -------------------------------------------------------------------------------- 1 | class AddOrderToScan < ActiveRecord::Migration 2 | def self.up 3 | add_column :scans, :order_by, :string 4 | end 5 | 6 | def self.down 7 | remove_column :scans, :order_by 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_session.html.erb: -------------------------------------------------------------------------------- 1 | * session id: <%=raw @request.session['session_id'].inspect.html_safe %> 2 | * data: <%=raw PP.pp @request.session.inspect.gsub(/\n/, "\n ").strip.html_safe %> 3 | -------------------------------------------------------------------------------- /vendor/plugins/transactional_migrations/about.yml: -------------------------------------------------------------------------------- 1 | author: simon@redhillconsulting.com.au 2 | summary: Ensures your migration scripts--both up and down--run within a transaction. 3 | homepage: http://www.redhillonrails.org 4 | license: MIT 5 | rails_version: EDGE 6 | -------------------------------------------------------------------------------- /db/migrate/20081226223848_rename_table.rb: -------------------------------------------------------------------------------- 1 | class RenameTable < ActiveRecord::Migration 2 | def self.up 3 | rename_table :daily_returns, :live_quotes 4 | end 5 | 6 | def self.down 7 | rename table :live_quotes, :daily_returns 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20081226231635_add_active_to_ticker.rb: -------------------------------------------------------------------------------- 1 | class AddActiveToTicker < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :active, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :tickers, :active 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090326160102_add_week_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddWeekToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :week, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :week 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090621183035_add_result_to_factor.rb: -------------------------------------------------------------------------------- 1 | class AddResultToFactor < ActiveRecord::Migration 2 | def self.up 3 | add_column :factors, :result, :string 4 | end 5 | 6 | def self.down 7 | remove_column :factors, :result 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090628162602_add_pass_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddPassToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :pass, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :pass 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090822010347_add_prefetch_to_scan.rb: -------------------------------------------------------------------------------- 1 | class AddPrefetchToScan < ActiveRecord::Migration 2 | def self.up 3 | add_column :scans, :prefetch, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :scans, :prefetch 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090826174851_undo_has_many_through_garbage.rb: -------------------------------------------------------------------------------- 1 | class UndoHasManyThroughGarbage < ActiveRecord::Migration 2 | def self.up 3 | drop_table :backtest_entries 4 | drop_table :backtest_exits 5 | end 6 | 7 | def self.down 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/derived_value_types/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing derived_value_types 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'derived_value_type', :collection => current_objects 7 | 8 | = link_to 'New derived_value_type', new_object_path 9 | -------------------------------------------------------------------------------- /app/views/portfolios/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing portfolios 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Initial Value 6 | 7 | = render :partial => 'portfolio', :collection => current_objects 8 | 9 | = link_to 'New portfolio', new_object_path 10 | -------------------------------------------------------------------------------- /db/migrate/20090207204640_add_date_to_live_quote.rb: -------------------------------------------------------------------------------- 1 | class AddDateToLiveQuote < ActiveRecord::Migration 2 | def self.up 3 | add_column :live_quotes, :date, :date 4 | end 5 | 6 | def self.down 7 | remove_column :live_quotes, :date 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090403144352_rename_tp_to_scan.rb: -------------------------------------------------------------------------------- 1 | class RenameTpToScan < ActiveRecord::Migration 2 | def self.up 3 | rename_table :ticker_populations, :scans 4 | end 5 | 6 | def self.down 7 | rename_table :scans, :ticker_populations 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090531043108_addlogr_to_posistion.rb: -------------------------------------------------------------------------------- 1 | class AddlogrToPosistion < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :logr, :float 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :logr, :float 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090606211312_add_short_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddShortToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :short, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :short 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090625210728_add_table_name_to_scan.rb: -------------------------------------------------------------------------------- 1 | class AddTableNameToScan < ActiveRecord::Migration 2 | def self.up 3 | add_column :scans, :table_name, :string 4 | end 5 | 6 | def self.down 7 | remove_column :scans, :table_name 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20091028202500_add_postfetch_to_scan.rb: -------------------------------------------------------------------------------- 1 | class AddPostfetchToScan < ActiveRecord::Migration 2 | def self.up 3 | add_column :scans, :postfetch, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :scans, :postfetch 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/acl_system2/init.rb: -------------------------------------------------------------------------------- 1 | require 'caboose/logic_parser' 2 | require 'caboose/role_handler' 3 | require 'caboose/access_control' 4 | 5 | # 6 | ActionController::Base.send :include, Caboose 7 | ActionController::Base.send :include, Caboose::AccessControl 8 | 9 | -------------------------------------------------------------------------------- /vendor/plugins/annotate_models/tasks/annotate_models_tasks.rake: -------------------------------------------------------------------------------- 1 | desc "Add schema information (as comments) to model files" 2 | 3 | task :annotate_models do 4 | require File.join(File.dirname(__FILE__), "../lib/annotate_models.rb") 5 | AnnotateModels.do_annotations 6 | end -------------------------------------------------------------------------------- /vendor/plugins/visualize_models/tasks/visualize_models_tasks.rake: -------------------------------------------------------------------------------- 1 | desc "Visualize the model structure (as .png image)" 2 | 3 | task :visualize_models do 4 | require File.join(File.dirname(__FILE__), "../lib/visualize_models.rb") 5 | VisualizeModels.do_visualize 6 | end -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/fixtures/reply.rb: -------------------------------------------------------------------------------- 1 | class Reply < ActiveRecord::Base 2 | belongs_to :topic, :include => [:replies] 3 | 4 | named_scope :recent, :conditions => ['replies.created_at > ?', 15.minutes.ago] 5 | 6 | validates_presence_of :content 7 | end 8 | -------------------------------------------------------------------------------- /app/views/historical_attributes/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing historical_attributes 2 | %table 3 | %tr.heading 4 | %th Name 5 | 6 | = render :partial => 'historical_attribute', :collection => current_objects 7 | 8 | = link_to 'New historical_attribute', new_object_path 9 | -------------------------------------------------------------------------------- /app/views/studies/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing studies 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Start Date 6 | %th End Date 7 | 8 | = render :partial => 'study', :collection => current_objects 9 | 10 | = link_to 'New study', new_object_path 11 | -------------------------------------------------------------------------------- /db/migrate/20081221004325_add_coeff_var_to_stat_values.rb: -------------------------------------------------------------------------------- 1 | class AddCoeffVarToStatValues < ActiveRecord::Migration 2 | def self.up 3 | add_column :stat_values, :cv, :float 4 | end 5 | 6 | def self.down 7 | remove_column :stat_values, :cv 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090310211259_add_validated_to_ticker.rb: -------------------------------------------------------------------------------- 1 | class AddValidatedToTicker < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :validated, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :tickers, :validated 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090312145039_add_locked_flag_to_ticker.rb: -------------------------------------------------------------------------------- 1 | class AddLockedFlagToTicker < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :locked, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :tickers, :locked 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090330163411_add_index_to_strategy.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToStrategy < ActiveRecord::Migration 2 | def self.up 3 | add_index :strategies, :name, :unique => true 4 | end 5 | 6 | def self.down 7 | remove_index :strategies, :name 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090523161236_add_low_to_intra_day_bar.rb: -------------------------------------------------------------------------------- 1 | class AddLowToIntraDayBar < ActiveRecord::Migration 2 | def self.up 3 | add_column :intra_day_bars, :low, :float 4 | end 5 | 6 | def self.down 7 | remove_column :intra_day_bars, :low 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/scans/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing Scans 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Start 6 | %th End 7 | %th Condidtions 8 | 9 | = render :partial => 'scan', :collection => current_objects 10 | 11 | = link_to 'Scan', new_object_path 12 | -------------------------------------------------------------------------------- /app/views/splits/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing splits 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Date 6 | %th From 7 | %th To 8 | 9 | = render :partial => 'splits', :collection => current_objects 10 | 11 | = link_to 'New splits', new_object_path 12 | -------------------------------------------------------------------------------- /db/migrate/20081230211500_rename_listing_table.rb: -------------------------------------------------------------------------------- 1 | class RenameListingTable < ActiveRecord::Migration 2 | def self.up 3 | rename_table :listings, :current_listings 4 | end 5 | 6 | def self.down 7 | rename_table :current_listings, :listings 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090112002225_add_index_to_aggregate.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToAggregate < ActiveRecord::Migration 2 | def self.up 3 | add_index(:aggregates, [:ticker_id, :start, :period]) 4 | end 5 | 6 | def self.down 7 | remove_index(:aggregates) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090112175621_add_avg_volume_to_aggregate.rb: -------------------------------------------------------------------------------- 1 | class AddAvgVolumeToAggregate < ActiveRecord::Migration 2 | def self.up 3 | remove_column :aggregates, :avg_volume 4 | end 5 | 6 | def self.down 7 | add_column :aggregates, :avg_volume 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090826030109_remove_from_positions.rb: -------------------------------------------------------------------------------- 1 | class RemoveFromPositions < ActiveRecord::Migration 2 | def self.up 3 | remove_column :positions, :exit_trigger 4 | end 5 | 6 | def self.down 7 | add_column :positions, :exit_trigger, :float 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/strategies/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing strategies 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Description 6 | %th Parameters 7 | 8 | = render :partial => 'strategy', :collection => current_objects 9 | 10 | = link_to 'New strategy', new_object_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090308043254_change_ticker_index_to_unique.rb: -------------------------------------------------------------------------------- 1 | class ChangeTickerIndexToUnique < ActiveRecord::Migration 2 | def self.up 3 | remove_index :tickers, :symbol 4 | add_index :tickers, :symbol, :unique => true 5 | end 6 | 7 | def self.down 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090611141759_rename_interval.rb: -------------------------------------------------------------------------------- 1 | class RenameInterval < ActiveRecord::Migration 2 | def self.up 3 | rename_column :intra_day_bars, :interval, :period 4 | end 5 | 6 | def self.down 7 | rename_column :intra_day_bars, :period, :interval 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090804171022_add_exit_pass_to_positions.rb: -------------------------------------------------------------------------------- 1 | class AddExitPassToPositions < ActiveRecord::Migration 2 | def self.up 3 | remove_column :positions, :exit_pass 4 | end 5 | 6 | def self.down 7 | add_column :positions, :exit_pass, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090810235140_add_last_seq_to_stock_watch.rb: -------------------------------------------------------------------------------- 1 | class AddLastSeqToStockWatch < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :last_seq, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :watch_list, :last_seq 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20091005222651_add_adj_close_to_yahoo_bar.rb: -------------------------------------------------------------------------------- 1 | class AddAdjCloseToYahooBar < ActiveRecord::Migration 2 | def self.up 3 | add_column :yahoo_bars, :adj_close, :float 4 | end 5 | 6 | def self.down 7 | remove_column :yahoo_bars, :adj_close 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_request.html.erb: -------------------------------------------------------------------------------- 1 | * URL : <%=raw @request.url %> 2 | * IP address: <%=raw @request.remote_ip %> 3 | * Parameters: <%=raw @request.fitered_params.inspect %> 4 | * Rails root: <%=raw Rails.root %> 5 | -------------------------------------------------------------------------------- /app/views/orders/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Order 2 | 3 | = error_messages_for :order 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/sectors/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Sector 2 | 3 | = error_messages_for :sector 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/splits/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Splits 2 | 3 | = error_messages_for :splits 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/studies/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Study 2 | 3 | = error_messages_for :study 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/tickers/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Ticker 2 | 3 | = error_messages_for :ticker 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090527162442_add_index_to_daily_bars.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToDailyBars < ActiveRecord::Migration 2 | def self.up 3 | add_index :daily_bars, [:ticker_id, :date] 4 | end 5 | 6 | def self.down 7 | remove_index :daily_bars, [:ticker_id, :date] 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090528233546_create_sectors.rb: -------------------------------------------------------------------------------- 1 | class CreateSectors < ActiveRecord::Migration 2 | def self.up 3 | create_table :sectors, :force => true do |t| 4 | t.string :name 5 | end 6 | end 7 | 8 | def self.down 9 | drop_table :sectors 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090610015332_rename_rety_count.rb: -------------------------------------------------------------------------------- 1 | class RenameRetyCount < ActiveRecord::Migration 2 | def self.up 3 | rename_column :tickers, :rety_count, :retry_count 4 | end 5 | 6 | def self.down 7 | rename_column :tickers, :retry_count, :rety_count 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090618213332_add_tid_to_study_result.rb: -------------------------------------------------------------------------------- 1 | class AddTidToStudyResult < ActiveRecord::Migration 2 | def self.up 3 | add_column :study_results, :ticker_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :study_results, :ticker_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090726180014_add_close_flag_to_tda_position.rb: -------------------------------------------------------------------------------- 1 | class AddCloseFlagToTdaPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :tda_positions, :com, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :tda_positions, :com 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090815165411_add_stale_date_to_watch_list.rb: -------------------------------------------------------------------------------- 1 | class AddStaleDateToWatchList < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :stale_date, :date 4 | end 5 | 6 | def self.down 7 | remove_column :watch_list, :stale_date 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090924181907_add_sim_position_to_order.rb: -------------------------------------------------------------------------------- 1 | class AddSimPositionToOrder < ActiveRecord::Migration 2 | def self.up 3 | add_column :orders, :sim_position_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :orders, :sim_position_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20091028012051_add_delisted_to_ticker.rb: -------------------------------------------------------------------------------- 1 | class AddDelistedToTicker < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :delisted, :boolean, :default => 0 4 | end 5 | 6 | def self.down 7 | remove_column :tickers, :delisted 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/helper.rb: -------------------------------------------------------------------------------- 1 | module <%= controller_class_name %>Helper 2 | def <%= plural_name -%>_path 3 | objects_path 4 | end 5 | 6 | def <%= singular_name -%>_path(obj) 7 | object_path(obj) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/unit_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../test_helper' 2 | 3 | class <%= class_name %>Test < Test::Unit::TestCase 4 | def test_truth 5 | assert true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/exchanges/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Exchange 2 | 3 | = error_messages_for :exchange 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/positions/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Position 2 | 3 | = error_messages_for :position 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/sim_jobs/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Sim Jobs 2 | 3 | = error_messages_for :sim_job 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/snapshots/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Snapshot 2 | 3 | = error_messages_for :snapshot 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090103173409_add_dormant_flag_to_ticker.rb: -------------------------------------------------------------------------------- 1 | class AddDormantFlagToTicker < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :dormant, :boolean, :default => false 4 | end 5 | 6 | def self.down 7 | remove_column :tickers, :dormant 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090505155855_rename_normalize.rb: -------------------------------------------------------------------------------- 1 | class RenameNormalize < ActiveRecord::Migration 2 | def self.up 3 | rename_column :positions, :nomalized_return, :nreturn 4 | end 5 | 6 | def self.down 7 | rename_column :positions, :return, :nomalized_return 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090726160107_add_std_devto_watch_list.rb: -------------------------------------------------------------------------------- 1 | class AddStdDevtoWatchList < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :predicted_sd, :float 4 | end 5 | 6 | def self.down 7 | remove_column :watch_list, :predicted_sd, :float 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090727032303_add_num_samples_to_watch_list.rb: -------------------------------------------------------------------------------- 1 | class AddNumSamplesToWatchList < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :num_samples, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :watch_list, :num_samples 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090729170007_rename_update_at.rb: -------------------------------------------------------------------------------- 1 | class RenameUpdateAt < ActiveRecord::Migration 2 | def self.up 3 | rename_column :watch_list, :updated_at, :last_snaptime 4 | end 5 | 6 | def self.down 7 | rename_column :watch_list, :last_snaptime, :updated_at 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090824160651_rename_openned_at.rb: -------------------------------------------------------------------------------- 1 | class RenameOpennedAt < ActiveRecord::Migration 2 | def self.up 3 | rename_column :tda_positions, :openned_at, :opened_at 4 | end 5 | 6 | def self.down 7 | rename_column :tda_positions, :opened_at, :openned_at 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090906030133_add_trigger_at_to_positions.rb: -------------------------------------------------------------------------------- 1 | class AddTriggerAtToPositions < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :triggered_at, :datetime 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :triggered_at 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/daily_bars/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Daily Bar 2 | 3 | = error_messages_for :daily_bar 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/indicators/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Indicator 2 | 3 | = error_messages_for :indicator 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/industries/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Industry 2 | 3 | = error_messages_for :industry 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/plot_types/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Plot Type 2 | 3 | = error_messages_for :plot_type 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/portfolios/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Portfolio 2 | 3 | = error_messages_for :portfolio 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/strategies/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Strategy 2 | 3 | = error_messages_for :strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20081227191313_add_index_to_live_quotes.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToLiveQuotes < ActiveRecord::Migration 2 | def self.up 3 | add_index :live_quotes, [ :ticker_id, :last_trade_time ], :unique => true 4 | end 5 | 6 | def self.down 7 | remove_index :live_quotes 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090112175259_add_sample_count_to_aggregate.rb: -------------------------------------------------------------------------------- 1 | class AddSampleCountToAggregate < ActiveRecord::Migration 2 | def self.up 3 | add_column :aggregates, :sample_count, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :aggregates, :sample_count 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090207202449_add_index2_to_aggregates.rb: -------------------------------------------------------------------------------- 1 | class AddIndex2ToAggregates < ActiveRecord::Migration 2 | def self.up 3 | add_index :aggregates, [:ticker_id, :date] 4 | end 5 | 6 | def self.down 7 | remove_index :aggregates, :column => [:ticker_id, :date] 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090210230614_create_var_aggregates.rb: -------------------------------------------------------------------------------- 1 | class CreateVarAggregates < ActiveRecord::Migration 2 | def self.up 3 | Aggregate.connection.exeucte("create table var_aggregates like aggregates") 4 | end 5 | 6 | def self.down 7 | drop_table :var_aggregates 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090306193422_add_alias_to_tickers.rb: -------------------------------------------------------------------------------- 1 | class AddAliasToTickers < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :alias, :string 4 | add_index :tickers, :alias 5 | end 6 | 7 | def self.down 8 | remove_column :tickers, :alias 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20090326161245_add_index_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_index :positions, [:portfolio_id, :ticker_id] 4 | end 5 | 6 | def self.down 7 | remove_index :positions, [:portfolio_id, :ticker_id] 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090528233606_create_industries.rb: -------------------------------------------------------------------------------- 1 | class CreateIndustries < ActiveRecord::Migration 2 | def self.up 3 | create_table :industries, :force => true do |t| 4 | t.string :name 5 | end 6 | end 7 | 8 | def self.down 9 | drop_table :industries 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090612175135_rename_intra_archive.rb: -------------------------------------------------------------------------------- 1 | class RenameIntraArchive < ActiveRecord::Migration 2 | def self.up 3 | rename_table :intra_day_archive, :intra_day_archives 4 | end 5 | 6 | def self.down 7 | rename_table :intra_day_archives, :intra_day_archive 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090617190455_create_indicators.rb: -------------------------------------------------------------------------------- 1 | class CreateIndicators < ActiveRecord::Migration 2 | def self.up 3 | create_table :indicators, :force => true do |t| 4 | t.string :name 5 | end 6 | end 7 | 8 | def self.down 9 | drop_table :indicators 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090817185325_rename_num_shares.rb: -------------------------------------------------------------------------------- 1 | class RenameNumShares < ActiveRecord::Migration 2 | def self.up 3 | rename_column :tda_positions, :rum_shares, :num_shares 4 | end 5 | 6 | def self.down 7 | rename_column :tda_positions, :num_shares, :rum_shares 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090818213209_rename_opened_on_date.rb: -------------------------------------------------------------------------------- 1 | class RenameOpenedOnDate < ActiveRecord::Migration 2 | def self.up 3 | rename_column :watch_list, :entered_on, :listed_on 4 | end 5 | 6 | def self.down 7 | rename_column :watch_list, :listed_on, :entered_on 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090906192715_add_trigger_price_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddTriggerPriceToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :trigger_price, :float 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :trigger_price 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/talib/ext/extconf.rb: -------------------------------------------------------------------------------- 1 | require 'mkmf' 2 | 3 | #find_header("rb_gsl_array.h", "../include-1.8.7") 4 | find_header("rb_gsl_array.h", "../include-1.9.1") 5 | dir_config("talib", "/usr/local/include/ta-lib", "/usr/local/lib") 6 | have_library("ta_lib", "TA_Initialize") 7 | 8 | create_makefile("talib") 9 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb' 3 | libs = [] 4 | 5 | libs << 'irb/completion' 6 | libs << File.join('lib', 'load_fixtures') 7 | 8 | exec "#{irb} -Ilib:test#{libs.map{ |l| " -r #{l}" }.join} --simple-prompt" 9 | -------------------------------------------------------------------------------- /app/views/aggregations/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Aggregation 2 | 3 | = error_messages_for :aggregation 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/daily_closes/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Daily Close 2 | 3 | = error_messages_for :daily_close 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/exit_strategies/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing exit_strategies 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Params 6 | %th Description 7 | 8 | = render :partial => 'exit_strategy', :collection => current_objects 9 | 10 | = link_to 'New exit_strategy', new_object_path 11 | -------------------------------------------------------------------------------- /app/views/ledger_txns/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Ledger Txn 2 | 3 | = error_messages_for :ledger_txn 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/live_quotes/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Live Quote 2 | 3 | = error_messages_for :live_quote 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/sim_summaries/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Sim Summary 2 | 3 | = error_messages_for :sim_summary 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/stat_values/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Stat Value 2 | 3 | = error_messages_for :stat_value 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/watch_lists/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Watch List 2 | 3 | = error_messages_for :watch_list 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090206183913_add_unique_key_to_aggregates.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueKeyToAggregates < ActiveRecord::Migration 2 | def self.up 3 | add_index(:aggregates, [:ticker_id, :start, :period], :unique => true) 4 | end 5 | 6 | def self.down 7 | remove_index(:aggregates) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090207205520_add_index2_to_live_quotes.rb: -------------------------------------------------------------------------------- 1 | class AddIndex2ToLiveQuotes < ActiveRecord::Migration 2 | def self.up 3 | add_index :live_quotes, [ :ticker_id, :date ] 4 | end 5 | 6 | def self.down 7 | add_index :live_quotes, :colums => [ :ticker_id, :date ] 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090826160215_drop_vestigial_tables.rb: -------------------------------------------------------------------------------- 1 | class DropVestigialTables < ActiveRecord::Migration 2 | def self.up 3 | drop_table :scans_strategies 4 | drop_table :slopes 5 | drop_table :cstats 6 | drop_table :bar_lookup 7 | end 8 | 9 | def self.down 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090917220410_add_interpolated_to_intra_day_bar.rb: -------------------------------------------------------------------------------- 1 | class AddInterpolatedToIntraDayBar < ActiveRecord::Migration 2 | def self.up 3 | add_column :daily_bars, :interpolated, :boolean 4 | end 5 | 6 | def self.down 7 | remove_column :daiy_bars, :interpolated 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/contract_types/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Contract Type 2 | 3 | = error_messages_for :contract_type 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/daily_closes/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.date_select :date 3 | = f.text_field :opening 4 | = f.text_field :close 5 | = f.text_field :high 6 | = f.text_field :low 7 | = f.text_field :adj_close 8 | = f.text_field :volume 9 | = f.text_field :week 10 | = f.text_field :month 11 | -------------------------------------------------------------------------------- /app/views/entry_strategies/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing entry_strategies 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Params 6 | %th Description 7 | 8 | = render :partial => 'entry_strategy', :collection => current_objects 9 | 10 | = link_to 'New entry_strategy', new_object_path 11 | -------------------------------------------------------------------------------- /app/views/indicator_values/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing indicator_values 2 | %table 3 | %tr.heading 4 | %th Indicator 5 | %th Datetime 6 | %th Value 7 | 8 | = render :partial => 'indicator_value', :collection => current_objects 9 | 10 | = link_to 'New indicator_value', new_object_path 11 | -------------------------------------------------------------------------------- /app/views/intra_day_bars/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Intra Day Bar 2 | 3 | = error_messages_for :intra_day_bar 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/scans/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Ticker Population 2 | 3 | = error_messages_for :ticker_population 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/sim_positions/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Sim Position 2 | 3 | = error_messages_for :sim_position 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090301044945_add_missed_minutes_to_ticker.rb: -------------------------------------------------------------------------------- 1 | class AddMissedMinutesToTicker < ActiveRecord::Migration 2 | def self.up 3 | add_column :tickers, :missed_minutes, :integer, :default => 0 4 | end 5 | 6 | def self.down 7 | remove_column :tickers, :missed_minutes 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090531211334_add_accum_volume_to_intra_day_bar.rb: -------------------------------------------------------------------------------- 1 | class AddAccumVolumeToIntraDayBar < ActiveRecord::Migration 2 | def self.up 3 | add_column :intra_day_bars, :accum_volume, :float 4 | end 5 | 6 | def self.down 7 | remove_column :intra_day_bars, :accum_volume 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/fixtures/sectors.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: sectors 5 | # 6 | # id :integer(4) not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /app/views/entry_strategies/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Entry Strategy 2 | 3 | = error_messages_for :entry_strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/exit_strategies/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Exit Strategy 2 | 3 | = error_messages_for :exit_strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/intra_snapshots/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Intra Snapshot 2 | 3 | = error_messages_for :intra_snapshot 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/position_series/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Position Series 2 | 3 | = error_messages_for :position_series 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/trigger_strategies/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing trigger_strategies 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Params 6 | %th Description 7 | 8 | = render :partial => 'trigger_strategy', :collection => current_objects 9 | 10 | = link_to 'New trigger_strategy', new_object_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090804170603_add_indicator_id_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddIndicatorIdToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :indicator_id, :integer, :references => nil 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :indicator_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/fixtures/indicators.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: indicators 5 | # 6 | # id :integer(4) not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /test/fixtures/industries.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: industries 5 | # 6 | # id :integer(4) not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /app/views/exchanges/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing exchanges 2 | %table 3 | %tr.heading 4 | %th Symbol 5 | %th Name 6 | %th Country 7 | %th Currency 8 | %th Timezone 9 | 10 | = render :partial => 'exchange', :collection => current_objects 11 | 12 | = link_to 'New exchange', new_object_path 13 | -------------------------------------------------------------------------------- /app/views/indicator_values/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Indicator Value 2 | 3 | = error_messages_for :indicator_value 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/ledger_txns/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing ledger_txns 2 | %table 3 | %tr.heading 4 | %th Amount 5 | %th Date 6 | %th Type 7 | %th Order 8 | %th Msg 9 | 10 | = render :partial => 'ledger_txn', :collection => current_objects 11 | 12 | = link_to 'New ledger_txn', new_object_path 13 | -------------------------------------------------------------------------------- /app/views/listing_categories/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Listing Category 2 | 3 | = error_messages_for :listing_category 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/snapshots/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.datetime_select :bartime 3 | = f.text_field :seq 4 | = f.text_field :opening 5 | = f.text_field :high 6 | = f.text_field :low 7 | = f.text_field :close 8 | = f.text_field :volume 9 | = f.text_field :accum_volume 10 | = f.text_field :secmid 11 | -------------------------------------------------------------------------------- /app/views/trigger_strategies/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Trigger Strategy 2 | 3 | = error_messages_for :trigger_strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090618210756_reanme_to_factor_id.rb: -------------------------------------------------------------------------------- 1 | class ReanmeToFactorId < ActiveRecord::Migration 2 | def self.up 3 | rename_column :study_results, :indicators_studies_id, :factor_id 4 | end 5 | 6 | def self.down 7 | rename_column :study_results, :factor_id, :indicators_studies_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090719164751_create_ta_specs.rb: -------------------------------------------------------------------------------- 1 | class CreateTaSpecs < ActiveRecord::Migration 2 | def self.up 3 | create_table :ta_specs do |t| 4 | t.integer :indicator_id 5 | t.integer :time_period 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :ta_specs 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20090906180655_add_trigger_strategy_to_positions.rb: -------------------------------------------------------------------------------- 1 | class AddTriggerStrategyToPositions < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :trigger_strategy_id, :integer 4 | end 5 | 6 | def self.down 7 | remove_column :positions, :trigger_strategy_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/view__form.haml: -------------------------------------------------------------------------------- 1 | <%- for attribute in attributes -%> 2 | <%- if attribute.name =~ /_id$/ -%> 3 | = f.table_select :<%= attribute.name %> 4 | <%- else -%> 5 | = f.<%= attribute.field_type %> :<%= attribute.name %> 6 | <%- end -%> 7 | <% end -%> 8 | -------------------------------------------------------------------------------- /app/views/derived_value_types/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Derived Value Type 2 | 3 | = error_messages_for :derived_value_type 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/plot_attributes/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Plot Attributes 2 | 3 | = error_messages_for :plot_attributes 4 | 5 | %fieldset 6 | - smart_remote_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/position_series/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing position_series 2 | %table 3 | %tr.heading 4 | %th Position 5 | %th Date 6 | %th Indicator 7 | %th Value 8 | 9 | = render :partial => 'position_series', :collection => current_objects 10 | 11 | = link_to 'New position_series', new_object_path 12 | -------------------------------------------------------------------------------- /db/migrate/20081219012557_remove_updated_at_from_real_time_quotes.rb: -------------------------------------------------------------------------------- 1 | class RemoveUpdatedAtFromRealTimeQuotes < ActiveRecord::Migration 2 | def self.up 3 | remove_column :real_time_quotes, :updated_at 4 | end 5 | 6 | def self.down 7 | add_column :real_time_quotes, :updated_at, :datetime 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20081221002851_add_index_to_daily_closes.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToDailyCloses < ActiveRecord::Migration 2 | def self.up 3 | add_index(:daily_closes, [:ticker_id, :date], :unique => true) 4 | end 5 | 6 | def self.down 7 | remove_index(:daily_closes, :column => [:ticker_id, :date]) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20081225165149_remove_created_at_from_real_time_quote.rb: -------------------------------------------------------------------------------- 1 | class RemoveCreatedAtFromRealTimeQuote < ActiveRecord::Migration 2 | def self.up 3 | remove_column :real_time_quotes, :created_at 4 | end 5 | 6 | def self.down 7 | add_column :real_time_quotes, :created_at, :datetime 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090331042022_add_description_to_ticker_population.rb: -------------------------------------------------------------------------------- 1 | class AddDescriptionToTickerPopulation < ActiveRecord::Migration 2 | def self.up 3 | add_column :ticker_populations, :description, :string 4 | end 5 | 6 | def self.down 7 | remove_column :ticker_populations, :description 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090605144414_rename_start_time_in_snapshots.rb: -------------------------------------------------------------------------------- 1 | class RenameStartTimeInSnapshots < ActiveRecord::Migration 2 | def self.up 3 | rename_column :intra_snapshots, :start_time, :snap_time 4 | end 5 | 6 | def self.down 7 | rename_column :intra_snapshots, :snap_time, :start_time 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/fixtures/contract_types.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: contract_types 5 | # 6 | # id :integer(4) not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /vendor/plugins/foreign_key_migrations/generators/foreign_key_migration/templates/migration.rb: -------------------------------------------------------------------------------- 1 | class <%= migration_name %> < ActiveRecord::Migration 2 | def self.up 3 | <% foreign_keys.each do |foreign_key| -%> 4 | <%= foreign_key.to_dump %> 5 | <% end -%> 6 | end 7 | 8 | def self.down 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/views/orders/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Order 2 | 3 | = error_messages_for :order 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/splits/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Splits 2 | 3 | = error_messages_for :splits 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/studies/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Study 2 | 3 | = error_messages_for :study 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/tda_positions/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Opening TD Ameritrade Position 2 | 3 | = error_messages_for :tda_position 4 | 5 | %fieldset 6 | - smart_form_for(@tda_position) do |f| 7 | = render :partial => "form", :locals => {:f => f, :new => true} 8 | %p= f.submit "Open" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/tickers/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :symbol, :size => 5 2 | = f.table_select :exchange_id, :value => :symbol 3 | = f.text_field :name 4 | = f.text_field :retry_count 5 | = f.table_select :sector_id 6 | = f.table_select :industry_id 7 | = f.check_box :etf 8 | = f.check_box :active 9 | = f.check_box :delisted 10 | -------------------------------------------------------------------------------- /db/migrate/20081228175347_create_index_on_daily_closes.rb: -------------------------------------------------------------------------------- 1 | class CreateIndexOnDailyCloses < ActiveRecord::Migration 2 | def self.up 3 | add_index(:daily_closes, [:ticker_id, :date], :unique => true) 4 | end 5 | 6 | def self.down 7 | remove_index(:daily_closes, :column => [:ticker_id, :date]) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/historical_attributes/new.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating Historical Attribute 2 | 3 | = error_messages_for :historical_attribute 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/sectors/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Sector 2 | 3 | = error_messages_for :sector 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/tickers/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Ticker 2 | 3 | = error_messages_for :ticker 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090709170347_add_seq_to_intra_day_bar.rb: -------------------------------------------------------------------------------- 1 | class AddSeqToIntraDayBar < ActiveRecord::Migration 2 | include LoadBars 3 | 4 | def self.up 5 | add_column :intra_day_bars, :seq, :integer 6 | backfill_seq() 7 | end 8 | 9 | def self.down 10 | remove_column :intra_day_bars, :seq 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /script/delayed_job: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Daemons sets pwd to /, so we have to explicitly set RAILS_ROOT 4 | RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) 5 | 6 | require File.join(File.dirname(__FILE__), *%w(.. vendor plugins delayed_job lib delayed command)) 7 | Delayed::Command.new(ARGV).daemonize 8 | -------------------------------------------------------------------------------- /test/fixtures/derived_value_types.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: derived_value_types 5 | # 6 | # id :integer(4) not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /test/fixtures/historical_attributes.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: historical_attributes 5 | # 6 | # id :integer(4) not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /app/views/daily_bars/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Daily Bar 2 | 3 | = error_messages_for :daily_bar 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/exchanges/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Exchange 2 | 3 | = error_messages_for :exchange 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/indicators/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Indicator 2 | 3 | = error_messages_for :indicator 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/industries/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Industry 2 | 3 | = error_messages_for :industry 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/plot_types/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Plot Type 2 | 3 | = error_messages_for :plot_type 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/portfolios/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Portfolio 2 | 3 | = error_messages_for :portfolio 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/positions/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Position 2 | 3 | = error_messages_for :position 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/sim_jobs/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Sim Jobs 2 | 3 | = error_messages_for :sim_job 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "ReSubmit" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/snapshots/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Snapshot 2 | 3 | = error_messages_for :snapshot 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/strategies/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Strategy 2 | 3 | = error_messages_for :strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090210002335_create_pimary_key_ids.rb: -------------------------------------------------------------------------------- 1 | class CreatePimaryKeyIds < ActiveRecord::Migration 2 | def self.up 3 | create_table :pimary_key_ids do |t| 4 | t.string :table_name 5 | t.integer :auto_increment 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :pimary_key_ids 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20090217201836_create_contract_types.rb: -------------------------------------------------------------------------------- 1 | class CreateContractTypes < ActiveRecord::Migration 2 | def self.up 3 | create_table :contract_types, :force => true do |t| 4 | t.string :name 5 | t.timestamps 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :contract_types 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/fixtures/developers_projects.yml: -------------------------------------------------------------------------------- 1 | david_action_controller: 2 | developer_id: 1 3 | project_id: 2 4 | joined_on: 2004-10-10 5 | 6 | david_active_record: 7 | developer_id: 1 8 | project_id: 1 9 | joined_on: 2004-10-10 10 | 11 | jamis_active_record: 12 | developer_id: 2 13 | project_id: 1 -------------------------------------------------------------------------------- /app/views/ledger_txns/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Ledger Txn 2 | 3 | = error_messages_for :ledger_txn 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/live_quotes/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Live Quote 2 | 3 | = error_messages_for :live_quote 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/stat_values/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Stat Value 2 | 3 | = error_messages_for :stat_value 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/watch_lists/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Watch List 2 | 3 | = error_messages_for :watch_list 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090403161440_create_scans_tickers.rb: -------------------------------------------------------------------------------- 1 | class CreateScansTickers < ActiveRecord::Migration 2 | def self.up 3 | create_table :scans_tickers, :id => false do |t| 4 | t.integer :ticker_id 5 | t.integer :scan_id 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :scans_tickers 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/fixtures/listing_categories.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: listing_categories 5 | # 6 | # id :integer(4) default(0), not null, primary key 7 | # name :string(255) 8 | # 9 | 10 | one: 11 | id: 1 12 | name: MyString 13 | two: 14 | id: 2 15 | name: MyString 16 | -------------------------------------------------------------------------------- /vendor/plugins/transactional_migrations/lib/transactional_migrations.rb: -------------------------------------------------------------------------------- 1 | ActiveRecord::ConnectionAdapters::SchemaStatements.send(:include, RedHillConsulting::TransactionalMigrations::ActiveRecord::ConnectionAdapters::SchemaStatements) 2 | ActiveRecord::Migration.send(:include, RedHillConsulting::TransactionalMigrations::ActiveRecord::Migration) 3 | -------------------------------------------------------------------------------- /app/views/aggregations/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Aggregation 2 | 3 | = error_messages_for :aggregation 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/daily_closes/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Daily Close 2 | 3 | = error_messages_for :daily_close 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/sim_positions/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Sim Position 2 | 3 | = error_messages_for :sim_position 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/sim_summaries/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Sim Summary 2 | 3 | = error_messages_for :sim_summary 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/tda_positions/close.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Closing TDA Position 2 | 3 | = error_messages_for :tda_position 4 | 5 | %fieldset 6 | - smart_form_for(current_object, :url => {:action => 'closed' } ) do |f| 7 | = render :partial => "close_form", :locals => {:f => f} 8 | %p= f.submit "Close" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /db/migrate/20090618183228_add_index_to_study.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToStudy < ActiveRecord::Migration 2 | def self.up 3 | add_index :studies, [:name, :version, :sub_version, :iteration ], :unique => true 4 | end 5 | 6 | def self.down 7 | remove_index :studies, :column => [:name, :version, :sub_version, :iteration ] 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/fixtures.yml: -------------------------------------------------------------------------------- 1 | one: 2 | id: 1 3 | <% for attribute in attributes -%> 4 | <%= attribute.name %>: <%= attribute.default %> 5 | <% end -%> 6 | two: 7 | id: 2 8 | <% for attribute in attributes -%> 9 | <%= attribute.name %>: <%= attribute.default %> 10 | <% end -%> 11 | -------------------------------------------------------------------------------- /app/views/contract_types/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Contract Type 2 | 3 | = error_messages_for :contract_type 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/daily_bars/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing daily_bars 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Date 6 | %th Open 7 | %th Close 8 | %th High 9 | %th Volume 10 | %th Logr 11 | 12 | = render :partial => 'daily_bar', :collection => current_objects 13 | 14 | = link_to 'New daily_bar', new_object_path 15 | -------------------------------------------------------------------------------- /app/views/exit_strategies/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Exit Strategy 2 | 3 | = error_messages_for :exit_strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/intra_day_bars/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Intra Day Bar 2 | 3 | = error_messages_for :intra_day_bar 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/intra_snapshots/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Intra Snapshot 2 | 3 | = error_messages_for :intra_snapshot 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/scans/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Ticker Population 2 | 3 | = error_messages_for :ticker_population 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090111231534_add_columns_to_aggregate.rb: -------------------------------------------------------------------------------- 1 | class AddColumnsToAggregate < ActiveRecord::Migration 2 | def self.up 3 | add_column :aggregates, :r, :float 4 | add_column :aggregates, :logr, :float 5 | end 6 | 7 | def self.down 8 | remove_column :aggregates, :logr 9 | remove_column :aggregates, :r 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090403160358_create_positions_scans.rb: -------------------------------------------------------------------------------- 1 | class CreatePositionsScans < ActiveRecord::Migration 2 | def self.up 3 | create_table :positions_scans, :id => false do |t| 4 | t.integer :position_id 5 | t.integer :scan_id 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :positions_scans 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20090506052559_remove_positions_scans.rb: -------------------------------------------------------------------------------- 1 | class RemovePositionsScans < ActiveRecord::Migration 2 | def self.up 3 | drop_table :positions_scans 4 | end 5 | 6 | def self.down 7 | create_table :positions_scans, :id => false do |t| 8 | t.integer :position_id 9 | t.integer :scan_id 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require(File.join(File.dirname(__FILE__), 'config', 'boot')) 5 | 6 | require 'rake' 7 | require 'rake/testtask' 8 | require 'rake/rdoctask' 9 | 10 | require 'tasks/rails' 11 | -------------------------------------------------------------------------------- /app/views/current_listing/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Current Listing 2 | 3 | = error_messages_for :current_listing 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/entry_strategies/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Entry Strategy 2 | 3 | = error_messages_for :entry_strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/indicator_values/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Indicator Value 2 | 3 | = error_messages_for :indicator_value 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/position_series/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Position Series 2 | 3 | = error_messages_for :position_series 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090217200947_create_portfolios.rb: -------------------------------------------------------------------------------- 1 | class CreatePortfolios < ActiveRecord::Migration 2 | def self.up 3 | create_table :portfolios, :force => true do |t| 4 | t.string :name 5 | t.float :initial_value 6 | t.timestamps 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :portfolios 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090307022020_create_derived_value_types.rb: -------------------------------------------------------------------------------- 1 | class CreateDerivedValueTypes < ActiveRecord::Migration 2 | def self.up 3 | create_table :derived_value_types, :force => true do |t| 4 | t.string :name 5 | t.timestamps 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :derived_value_types 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20090711171320_create_position_stats.rb: -------------------------------------------------------------------------------- 1 | class CreatePositionStats < ActiveRecord::Migration 2 | def self.up 3 | create_table :position_stats do |t| 4 | t.integer :position_id 5 | t.string :name 6 | t.float :value 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :position_stats 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090817002435_add_closed_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddClosedToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :roi, :float 4 | add_column :positions, :closed, :boolean 5 | end 6 | 7 | def self.down 8 | remove_column :positions, :roi 9 | remove_column :positions, :closed 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /doc/TODO: -------------------------------------------------------------------------------- 1 | * Run another daily bar merge from google/yahoo to insert missing bars 2 | * Verify that Lewis's nephew's 9/14 daily bars where folding in to the daily_bars table 3 | * Test volume column in simulator positions .csv file 4 | * Run simulations comparing alt_filtered to filtered positions. 5 | * Add options to use temporary tables when running positions 6 | -------------------------------------------------------------------------------- /vendor/plugins/squirrel/test/fixtures/users.yml: -------------------------------------------------------------------------------- 1 | first: 2 | id: 1 3 | name: Jon Yurek 4 | email: jyurek@thoughtbot.com 5 | company_id: 1 6 | second: 7 | id: 2 8 | name: Mister McThoughtbot 9 | email: mct@thoughtbot.com 10 | company_id: 1 11 | third: 12 | id: 3 13 | name: Google Intern 14 | email: No_1292@google.com 15 | company_id: 3 -------------------------------------------------------------------------------- /app/views/listing_categories/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Listing Category 2 | 3 | = error_messages_for :listing_category 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/plot_attributes/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Plot Attributes 2 | 3 | = error_messages_for :plot_attributes 4 | 5 | %fieldset 6 | - smart_remote_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/tda_positions/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Tda Position 2 | 3 | = error_messages_for :tda_position 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f, :new => false} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/trigger_strategies/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Trigger Strategy 2 | 3 | = error_messages_for :trigger_strategy 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090326154625_create_strategies.rb: -------------------------------------------------------------------------------- 1 | class CreateStrategies < ActiveRecord::Migration 2 | def self.up 3 | create_table :strategies, :force => true do |t| 4 | t.string :name 5 | t.string :description 6 | t.string :filename 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :strategies 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090618030500_create_study_results.rb: -------------------------------------------------------------------------------- 1 | class CreateStudyResults < ActiveRecord::Migration 2 | def self.up 3 | create_table :study_results do |t| 4 | t.integer :indicators_studies_id 5 | t.date :date 6 | t.float :value 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :study_results 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/mysql_column.rb: -------------------------------------------------------------------------------- 1 | module RedHillConsulting::Core::ActiveRecord::ConnectionAdapters 2 | module MysqlColumn 3 | def initialize(name, default, sql_type = nil, null = true) 4 | default = nil if !null && default.blank? 5 | super 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/views/derived_value_types/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Derived Value Type 2 | 3 | = error_messages_for :derived_value_type 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /app/views/plot_attributes/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing plot_attributes 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Symbol 6 | %th Type 7 | %th Anchor Date 8 | %th Period 9 | %th Attributes 10 | 11 | = render :partial => 'plot_attributes', :collection => current_objects 12 | 13 | = link_to 'New plot_attributes', new_object_path 14 | -------------------------------------------------------------------------------- /app/views/sim_summaries/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing sim_summaries 2 | %table 3 | %tr.heading 4 | %th Sim Date 5 | %th Positions Held 6 | %th Positions Available 7 | %th Portfolio Value 8 | %th Cash Balance 9 | 10 | = render :partial => 'sim_summary', :collection => current_objects 11 | 12 | = link_to 'New sim_summary', new_object_path 13 | -------------------------------------------------------------------------------- /app/views/historical_attributes/edit.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing Historical Attribute 2 | 3 | = error_messages_for :historical_attribute 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /db/migrate/20090630053955_rename_risk_factor.rb: -------------------------------------------------------------------------------- 1 | class RenameRiskFactor < ActiveRecord::Migration 2 | def self.up 3 | remove_column :positions, :risk_factor 4 | add_column :positions, :entry_pass, :integer 5 | end 6 | 7 | def self.down 8 | remove_column :positions, :entry_pass 9 | add_column :positions, :risk_factor, :float 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090909011746_drop_scans_triggers.rb: -------------------------------------------------------------------------------- 1 | class DropScansTriggers < ActiveRecord::Migration 2 | def self.up 3 | drop_table :scans_trigger_strategies 4 | end 5 | 6 | def self.down 7 | create_table(:scans_trigger_strategies, :id => false) do |t| 8 | t.integer :scan_id 9 | t.integer :trigger_strategy_id 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/views/plot_types/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing plot_types 2 | %table 3 | %tr.heading 4 | %th Name 5 | %th Source Model 6 | %th Method 7 | %th Time Class 8 | %th Resolution 9 | %th Inputs 10 | %th Num Outputs 11 | 12 | = render :partial => 'plot_type', :collection => current_objects 13 | 14 | = link_to 'New plot_type', new_object_path 15 | -------------------------------------------------------------------------------- /db/migrate/20081230031957_rework_live_quotes.rb: -------------------------------------------------------------------------------- 1 | class ReworkLiveQuotes < ActiveRecord::Migration 2 | def self.up 3 | rename_column :live_quotes, :change_percent, :r 4 | add_column :live_quotes, :logr, :float 5 | end 6 | 7 | def self.down 8 | rename_column :live_quotes, :r, :change_percent 9 | remove_column :live_quotes, :logr 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090506052012_create_positions_strategies.rb: -------------------------------------------------------------------------------- 1 | class CreatePositionsStrategies < ActiveRecord::Migration 2 | def self.up 3 | create_table :positions_strategies, :id => false do |t| 4 | t.integer :strategy_id 5 | t.integer :position_id 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :positions_strategies 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20090617191156_create_studies.rb: -------------------------------------------------------------------------------- 1 | class CreateStudies < ActiveRecord::Migration 2 | def self.up 3 | create_table :studies, :force => true do |t| 4 | t.string :name 5 | t.string :description 6 | t.date :start_date 7 | t.date :end_date 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :studies 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20090821150720_reog_columns_watch_list.rb: -------------------------------------------------------------------------------- 1 | class ReogColumnsWatchList < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :opened_on, :date 4 | remove_column :watch_list, :stale_date 5 | end 6 | 7 | def self.down 8 | remove_column :watch_list, :opened_on 9 | add_column :watch_list, :opened_on, :date 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090826024600_create_exit_strategies.rb: -------------------------------------------------------------------------------- 1 | class CreateExitStrategies < ActiveRecord::Migration 2 | def self.up 3 | create_table :exit_strategies, :force => true do |t| 4 | t.string :name 5 | t.string :params 6 | t.string :description 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :exit_strategies 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vendor/plugins/delayed_job/generators/delayed_job/templates/script: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Daemons sets pwd to /, so we have to explicitly set RAILS_ROOT 4 | RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) 5 | 6 | require File.join(File.dirname(__FILE__), *%w(.. vendor plugins delayed_job lib delayed command)) 7 | Delayed::Command.new(ARGV).daemonize 8 | -------------------------------------------------------------------------------- /app/views/orders/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.text_field :txn 2 | = f.text_field :type 3 | = f.text_field :expiration 4 | = f.text_field :quantity 5 | = f.datetime_select :placed_at 6 | = f.datetime_select :filled_at 7 | = f.text_field :activation_price 8 | = f.text_field :order_price 9 | = f.text_field :fill_price 10 | = f.table_select :ticker_id 11 | = f.table_select :position_id 12 | -------------------------------------------------------------------------------- /app/views/orders/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Order 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy order?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/scans/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Scan 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy scan?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/studies/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Study 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy study?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090617191640_create_indicators_studies.rb: -------------------------------------------------------------------------------- 1 | class CreateIndicatorsStudies < ActiveRecord::Migration 2 | def self.up 3 | create_table :indicators_studies do |t| 4 | t.integer :study_id 5 | t.integer :indicator_id 6 | t.string :params_str 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :indicators_studies 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090826024539_create_entry_strategies.rb: -------------------------------------------------------------------------------- 1 | class CreateEntryStrategies < ActiveRecord::Migration 2 | def self.up 3 | create_table :entry_strategies, :force => true do |t| 4 | t.string :name 5 | t.string :params 6 | t.string :description 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :entry_strategies 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090826185948_create_entry_stragies_scans.rb: -------------------------------------------------------------------------------- 1 | class CreateEntryStragiesScans < ActiveRecord::Migration 2 | def self.up 3 | create_table(:entry_strategies_scans, :id => false) do |t| 4 | t.integer :scan_id 5 | t.integer :entry_strategy_id 6 | end 7 | end 8 | 9 | def self.down 10 | drop_table :entry_strategies_scans; 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/view_new.haml: -------------------------------------------------------------------------------- 1 | %h1 Creating <%= singular_name.titleize %> 2 | 3 | = error_messages_for :<%= singular_name %> 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Create" 9 | 10 | = link_to 'Back', objects_path 11 | -------------------------------------------------------------------------------- /app/views/positions/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :portfolio_id 2 | = f.table_select :ticker_id 3 | = f.check_box :open 4 | = f.datetime_select :entry_date 5 | = f.datetime_select :exit_date 6 | = f.text_field :entry_price 7 | = f.text_field :exit_price 8 | = f.text_field :num_shares 9 | = f.table_select :contract_type_id 10 | = f.text_field :side 11 | = f.text_field :stop_loss 12 | -------------------------------------------------------------------------------- /app/views/sectors/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Sector 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy sector?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/splits/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Splits 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy splits?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/tickers/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Ticker 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy ticker?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090506055841_create_scans_strategies.rb: -------------------------------------------------------------------------------- 1 | class CreateScansStrategies < ActiveRecord::Migration 2 | def self.up 3 | create_table(:scans_strategies, :id => false) do |t| 4 | t.integer :scan_id 5 | t.integer :strategy_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :scans_strategies 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20090810172722_add_entry_date_to_watch_list.rb: -------------------------------------------------------------------------------- 1 | class AddEntryDateToWatchList < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :entered_on, :date 4 | add_column :watch_list, :closed_on, :date 5 | end 6 | 7 | def self.down 8 | remove_column :watch_list, :entered_on 9 | remove_column :watch_list, :closed_on 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20091011221634_add_adj_close_to_daily_bar.rb: -------------------------------------------------------------------------------- 1 | class AddAdjCloseToDailyBar < ActiveRecord::Migration 2 | def self.up 3 | remove_column :daily_bars, :interpolated 4 | add_column :daily_bars, :adj_close, :float 5 | end 6 | 7 | def self.down 8 | remove_column :daily_bars, :adj_close 9 | add_column :daily_bars, :interplated, :boolean 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/talib/include-1.8.7/rb_gsl_dirac.h: -------------------------------------------------------------------------------- 1 | #ifndef ___RB_GSL_DIRAC_H___ 2 | #define ___RB_GSL_DIRAC_H___ 3 | 4 | #include "ruby.h" 5 | #include "rubyio.h" 6 | #include "rb_gsl.h" 7 | #include "rb_gsl_common.h" 8 | #include "rb_gsl_complex.h" 9 | #include "rb_gsl_array.h" 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /lib/talib/include-1.9.1/rb_gsl_dirac.h: -------------------------------------------------------------------------------- 1 | #ifndef ___RB_GSL_DIRAC_H___ 2 | #define ___RB_GSL_DIRAC_H___ 3 | 4 | #include "ruby.h" 5 | #include "rubyio.h" 6 | #include "rb_gsl.h" 7 | #include "rb_gsl_common.h" 8 | #include "rb_gsl_complex.h" 9 | #include "rb_gsl_array.h" 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /app/views/exchanges/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Exchange 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy exchange?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/industries/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Industry 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy industry?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/positions/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Position 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy position?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/sim_jobs/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Sim Jobs 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy sim_job?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/snapshots/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Snapshot 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy snapshot?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/strategies/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Strategy 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy strategy?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/watch_lists/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id, :disabled => true 2 | = f.table_select :tda_position_id 3 | = f.text_field :rsi_target_price 4 | = f.text_field :target_ival 5 | = f.text_field :curr_price 6 | = f.text_field :curr_ival 7 | = f.text_field :predicted_price 8 | = f.text_field :predicted_ival 9 | = f.text_field :crossed_at 10 | = f.text_field :last_snaptime 11 | -------------------------------------------------------------------------------- /db/migrate/20090330162336_add_params_yaml_to_strategy.rb: -------------------------------------------------------------------------------- 1 | class AddParamsYamlToStrategy < ActiveRecord::Migration 2 | def self.up 3 | add_column :strategies, :params_yaml, :string 4 | remove_column :strategies, :filename 5 | end 6 | 7 | def self.down 8 | remove_column :strategies, :params_yaml 9 | remove_column :strategies, :filename, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090826144841_create_backtest_exits.rb: -------------------------------------------------------------------------------- 1 | class CreateBacktestExits < ActiveRecord::Migration 2 | def self.up 3 | create_table :backtest_exits do |t| 4 | t.integer :exit_strategy_id 5 | t.integer :position_id, :references => nil 6 | t.integer :scan_id 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :backtest_exits 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/current_listing/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Listing 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy listing?', :method => :delete 10 | | 11 | = link_to 'Back', tickers_path 12 | -------------------------------------------------------------------------------- /app/views/daily_bars/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Daily Bar 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy daily_bar?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/indicators/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Indicator 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy indicator?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/intra_day_bars/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing intra_day_bars 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Interval 6 | %th Start Time 7 | %th Open 8 | %th Close 9 | %th High 10 | %th Volume 11 | %th Delta 12 | 13 | = render :partial => 'intra_day_bar', :collection => current_objects 14 | 15 | = link_to 'New intra_day_bar', new_object_path 16 | -------------------------------------------------------------------------------- /app/views/intra_snapshots/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing intra_snapshots 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Interval 6 | %th Start Time 7 | %th Open 8 | %th Close 9 | %th High 10 | %th Low 11 | %th Volume 12 | 13 | = render :partial => 'intra_snapshot', :collection => current_objects 14 | 15 | = link_to 'New intra_snapshot', new_object_path 16 | -------------------------------------------------------------------------------- /app/views/ledger_txns/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Ledger Txn 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy ledger_txn?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/live_quotes/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Live Quote 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy live_quote?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/plot_types/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Plot Type 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy plot_type?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/portfolios/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Portfolio 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy portfolio?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/sectors/_sector.html.haml: -------------------------------------------------------------------------------- 1 | %tr[sector]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h sector.name 4 | %td.show 5 | = link_to 'Show', object_path(sector) 6 | %td.edit 7 | = link_to 'Edit', edit_object_path(sector) 8 | %td.destroy 9 | = link_to 'Destroy', object_path(sector), :confirm => 'Really destroy sector?', :method => :delete 10 | -------------------------------------------------------------------------------- /app/views/stat_values/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Stat Value 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy stat_value?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20081231002802_rename_cols_in_daily_close.rb: -------------------------------------------------------------------------------- 1 | class RenameColsInDailyClose < ActiveRecord::Migration 2 | def self.up 3 | rename_column :daily_closes, :return, :r 4 | rename_column :daily_closes, :log_return, :logr 5 | end 6 | 7 | def self.down 8 | rename_column :daily_closes, :r, :return 9 | rename_column :daily_closes, :logr, :log_return 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/fixtures/scans_tickers.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: scans_tickers 5 | # 6 | # ticker_id :integer(4) 7 | # scan_id :integer(4) 8 | # 9 | 10 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 11 | 12 | one: 13 | ticker_id: 1 14 | scan_id: 1 15 | 16 | two: 17 | ticker_id: 1 18 | scan_id: 1 19 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/lib/load_fixtures.rb: -------------------------------------------------------------------------------- 1 | require 'boot' 2 | require 'lib/activerecord_test_connector' 3 | 4 | # setup the connection 5 | ActiveRecordTestConnector.setup 6 | 7 | # load all fixtures 8 | Fixtures.create_fixtures(ActiveRecordTestConnector::FIXTURES_PATH, ActiveRecord::Base.connection.tables) 9 | 10 | require 'will_paginate' 11 | WillPaginate.enable_activerecord 12 | -------------------------------------------------------------------------------- /app/views/aggregations/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Aggregation 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy aggregation?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/daily_closes/_plot_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | 3 | - %w{ open close high low adj_close volume return log_return alr }.each do |col| 4 | = label_tag col 5 | = check_box_tag col 6 | 7 | = label_tag 'period_length' 8 | = select_tag :period_length, options_for_select %{all month week} 9 | = label_tag 'period' 10 | = select_tag :period, (1..52).to_a 11 | 12 | -------------------------------------------------------------------------------- /app/views/daily_closes/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Daily Close 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy daily_close?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/sim_positions/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Sim Position 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy sim_position?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/sim_summaries/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Sim Summary 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy sim_summary?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090826144607_create_backtest_entries.rb: -------------------------------------------------------------------------------- 1 | class CreateBacktestEntries < ActiveRecord::Migration 2 | def self.up 3 | create_table :backtest_entries do |t| 4 | t.integer :entry_strategy_id 5 | t.integer :position_id, :references => nil 6 | t.integer :scan_id 7 | end 8 | end 9 | 10 | def self.down 11 | drop_table :backtest_entries 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/em-jack/lib/em-jack.rb: -------------------------------------------------------------------------------- 1 | $:.unshift(File.dirname(__FILE__)) 2 | 3 | require 'em-jack/job' 4 | require 'em-jack/errors' 5 | require 'em-jack/beanstalk_connection' 6 | require 'em-jack/connection' 7 | 8 | Dir["#{File.dirname(__FILE__)}/em-jack/handlers/*.rb"].each do |file| 9 | require file 10 | end 11 | 12 | module EMJack 13 | module VERSION 14 | STRING = '0.1.0' 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/view_index.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing <%= plural_name %> 2 | %table 3 | %tr.heading 4 | <%- for attribute in attributes -%> 5 | %th <%= attribute.name.titleize %> 6 | <% end -%> 7 | 8 | = render :partial => '<%= singular_name %>', :collection => current_objects 9 | 10 | = link_to 'New <%= singular_name %>', new_object_path 11 | -------------------------------------------------------------------------------- /app/views/contract_types/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Contract Type 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy contract_type?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/exit_strategies/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Exit Strategy 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy exit_strategy?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/intra_day_bars/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Intra Day Bar 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy intra_day_bar?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090330155610_create_ticker_populations.rb: -------------------------------------------------------------------------------- 1 | class CreateTickerPopulations < ActiveRecord::Migration 2 | def self.up 3 | create_table :ticker_populations, :force => true do |t| 4 | t.string :name 5 | t.date :start 6 | t.date :end 7 | t.text :sql_query 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :ticker_populations 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/fixtures/positions_scans.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20090425175412 3 | # 4 | # Table name: positions_scans 5 | # 6 | # position_id :integer(4) 7 | # scan_id :integer(4) 8 | # 9 | 10 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 11 | 12 | one: 13 | position_id: 1 14 | scan_id: 1 15 | 16 | two: 17 | position_id: 1 18 | scan_id: 1 19 | -------------------------------------------------------------------------------- /app/views/entry_strategies/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Entry Strategy 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy entry_strategy?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/indicator_values/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Indicator Value 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy indicator_value?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/industries/_industry.html.haml: -------------------------------------------------------------------------------- 1 | %tr[industry]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h industry.name 4 | %td.show 5 | = link_to 'Show', object_path(industry) 6 | %td.edit 7 | = link_to 'Edit', edit_object_path(industry) 8 | %td.destroy 9 | = link_to 'Destroy', object_path(industry), :confirm => 'Really destroy industry?', :method => :delete 10 | -------------------------------------------------------------------------------- /app/views/intra_snapshots/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Intra Snapshot 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy intra_snapshot?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/plot_attributes/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Plot Attributes 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy plot_attributes?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/position_series/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Position Series 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy position_series?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/snapshots/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing snapshots 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Snaptime 6 | %th Seq 7 | %th Open 8 | %th High 9 | %th Low 10 | %th Close 11 | %th Volume 12 | %th Accum Volume 13 | %th Secmid 14 | 15 | = render :partial => 'snapshot', :collection => current_objects 16 | 17 | = link_to 'New snapshot', new_object_path 18 | -------------------------------------------------------------------------------- /app/views/tda_positions/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing TDA Positions 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Entered 6 | %th Exited 7 | %th Entry Price 8 | %th Exit Price 9 | %th Curr Price 10 | %th Shares 11 | %th Days Held 12 | %th Nreturn 13 | %th ROI 14 | %th Profit/Loss 15 | 16 | = render :partial => 'tda_position', :collection => current_objects 17 | -------------------------------------------------------------------------------- /app/views/watch_lists/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Watch List 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f, :new => false} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy watch_list?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090906171310_create_trigger_strategies.rb: -------------------------------------------------------------------------------- 1 | class CreateTriggerStrategies < ActiveRecord::Migration 2 | def self.up 3 | create_table :trigger_strategies, :force => true do |t| 4 | t.string :name 5 | t.string :params 6 | t.string :description 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :trigger_strategies 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20090907025059_augment_position_index.rb: -------------------------------------------------------------------------------- 1 | class AugmentPositionIndex < ActiveRecord::Migration 2 | def self.up 3 | add_index :positions, [:ticker_id, :scan_id, :trigger_strategy_id, :entry_strategy_id, :exit_strategy_id, :triggered_at], :unique => true, :name => :unique_param_ids 4 | end 5 | 6 | def self.down 7 | remove_index :positions, :name => :unique_param_ids 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/fixtures/scans_strategies.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20090826144841 3 | # 4 | # Table name: scans_strategies 5 | # 6 | # scan_id :integer(4) 7 | # strategy_id :integer(4) 8 | # 9 | 10 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 11 | 12 | one: 13 | scan_id: 1 14 | strategy_id: 1 15 | 16 | two: 17 | scan_id: 1 18 | strategy_id: 1 19 | -------------------------------------------------------------------------------- /app/views/aggregations/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.table_select :ticker_id 2 | = f.date_select :date 3 | = f.text_field :opening 4 | = f.text_field :close 5 | = f.text_field :high 6 | = f.text_field :low 7 | = f.text_field :adj_close 8 | = f.text_field :volume 9 | = f.text_field :week 10 | = f.text_field :month 11 | = f.text_field :sample_count 12 | = f.datetime_select :created_at 13 | = f.datetime_select :updated_at 14 | -------------------------------------------------------------------------------- /app/views/daily_closes/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing daily_closes 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Date 6 | %th Open 7 | %th Close 8 | %th High 9 | %th Low 10 | %th Adj Close 11 | %th Volume 12 | %th Week 13 | %th Month 14 | 15 | = render :partial => 'daily_close', :collection => current_objects 16 | 17 | = link_to 'New daily_close', new_object_path 18 | -------------------------------------------------------------------------------- /app/views/indicators/_indicator.html.haml: -------------------------------------------------------------------------------- 1 | %tr[indicator]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h indicator.name 4 | %td.show 5 | = link_to 'Show', object_path(indicator) 6 | %td.edit 7 | = link_to 'Edit', edit_object_path(indicator) 8 | %td.destroy 9 | = link_to 'Destroy', object_path(indicator), :confirm => 'Really destroy indicator?', :method => :delete 10 | -------------------------------------------------------------------------------- /app/views/listing_categories/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Listing Category 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy listing_category?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/sim_positions/_form.html.haml: -------------------------------------------------------------------------------- 1 | = f.datetime_select :entry_date 2 | = f.datetime_select :exit_date 3 | = f.text_field :quantity 4 | = f.text_field :entry_price 5 | = f.text_field :exit_price 6 | = f.text_field :nreturn 7 | = f.text_field :roi 8 | = f.text_field :days_held 9 | = f.table_select :eorder_id 10 | = f.table_select :xorder_id 11 | = f.table_select :ticker_id 12 | = f.table_select :position_id 13 | -------------------------------------------------------------------------------- /app/views/tda_positions/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Tda Position 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f, :new => false} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy tda_position?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/trigger_strategies/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Trigger Strategy 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy trigger_strategy?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090330160603_change_portfolio_to_population.rb: -------------------------------------------------------------------------------- 1 | class ChangePortfolioToPopulation < ActiveRecord::Migration 2 | def self.up 3 | remove_column :positions, :portfolio_id 4 | add_column :positions, :ticker_population_id, :integer 5 | end 6 | 7 | def self.down 8 | add_column :positions, :portfolio_id, :integer 9 | remove_column :positions, :ticker_population_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/derived_value_types/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Derived Value Type 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy derived_value_type?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/tickers/plot.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Launch Pad for Plot Functions 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Plot Daily Closes', plot_daily_close_path(current_object) 8 | | 9 | = link_to 'Plot Real-time Quote', plot_real_time_quote_path(current_object) 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20090301040911_create_bar_tables.rb: -------------------------------------------------------------------------------- 1 | class CreateBarTables < ActiveRecord::Migration 2 | def self.up 3 | [5, 10, 30, 60].each do |res| 4 | Aggregate.connection.execute "CREATE TABLE bar_#{res}s LIKE aggregates" 5 | end 6 | end 7 | 8 | def self.down 9 | [5, 10, 30, 60].each do |res| 10 | Aggregate.connection.execute "DROP TABLE bar_#{res}s" 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vendor/plugins/delayed_job/generators/delayed_job/delayed_job_generator.rb: -------------------------------------------------------------------------------- 1 | class DelayedJobGenerator < Rails::Generator::Base 2 | 3 | def manifest 4 | record do |m| 5 | m.template 'script', 'script/delayed_job', :chmod => 0755 6 | m.migration_template "migration.rb", 'db/migrate', 7 | :migration_file_name => "create_delayed_jobs" 8 | end 9 | end 10 | 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/view_edit.haml: -------------------------------------------------------------------------------- 1 | %h1 Editing <%= singular_name.titleize %> 2 | 3 | = error_messages_for :<%= singular_name %> 4 | 5 | %fieldset 6 | - smart_form_for(current_object) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | %p= f.submit "Update" 9 | 10 | = link_to 'Show', object_path 11 | | 12 | = link_to 'Back', objects_path 13 | -------------------------------------------------------------------------------- /vendor/plugins/redhillonrails_core/tasks/db/comments.rake: -------------------------------------------------------------------------------- 1 | namespace :db do 2 | desc "Describe all the tables in the database by reading the table comments" 3 | task :comments => :environment do 4 | ActiveRecord::Base.connection.tables.sort.each do |table_name| 5 | comment = ActiveRecord::Base.connection.table_comment(table_name) 6 | puts "#{table_name} - #{comment}" 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/historical_attributes/show.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing Historical Attribute 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy historical_attribute?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /app/views/tickers/launch_pad.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Launch Pad for Plot Functions 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Plot Daily Closes', plot_daily_close_path(current_object) 8 | | 9 | = link_to 'Plot Real-time Quote', plot_real_time_quote_path(current_object) 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /db/migrate/20091016185148_create_splits.rb: -------------------------------------------------------------------------------- 1 | class CreateSplits < ActiveRecord::Migration 2 | def self.up 3 | create_table :splits, :force => true do |t| 4 | t.integer :ticker_id 5 | t.date :date 6 | t.integer :from 7 | t.integer :to 8 | end 9 | add_index :splits, [:ticker_id, :date], :unique => true 10 | end 11 | 12 | def self.down 13 | drop_table :splits 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /test/fixtures/positions_strategies.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20090826030109 3 | # 4 | # Table name: positions_strategies 5 | # 6 | # strategy_id :integer(4) 7 | # position_id :integer(4) 8 | # 9 | 10 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 11 | 12 | one: 13 | strategy_id: 1 14 | position_id: 1 15 | 16 | two: 17 | strategy_id: 1 18 | position_id: 1 19 | -------------------------------------------------------------------------------- /vendor/plugins/foreign_key_migrations/lib/foreign_key_migrations.rb: -------------------------------------------------------------------------------- 1 | ActiveRecord::Base.send(:include, RedHillConsulting::ForeignKeyMigrations::ActiveRecord::Base) 2 | ActiveRecord::Migration.send(:include, RedHillConsulting::ForeignKeyMigrations::ActiveRecord::Migration) 3 | ActiveRecord::ConnectionAdapters::TableDefinition.send(:include, RedHillConsulting::ForeignKeyMigrations::ActiveRecord::ConnectionAdapters::TableDefinition) 4 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format 4 | # (all these examples are active by default): 5 | # Inflector.inflections do |inflect| 6 | # inflect.plural /^(ox)$/i, '\1en' 7 | # inflect.singular /^(ox)en/i, '\1' 8 | # inflect.irregular 'person', 'people' 9 | # inflect.uncountable %w( fish sheep ) 10 | # end 11 | -------------------------------------------------------------------------------- /db/migrate/20090310213733_add_foreign_key_to_daily_closes.rb: -------------------------------------------------------------------------------- 1 | class AddForeignKeyToDailyCloses < ActiveRecord::Migration 2 | def self.up 3 | add_foreign_key(:daily_closes, :ticker_id, :tickers, :id, :on_delete => :restrict, :on_update => :cascade, :name => :daily_closes_fk_ticker_id_tickers_id) 4 | end 5 | 6 | def self.down 7 | remove_foreign_key :daily_closes, :daily_closes_fk_ticker_id_tickers_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090906181342_create_trigger_stragegy_scans.rb: -------------------------------------------------------------------------------- 1 | class CreateTriggerStragegyScans < ActiveRecord::Migration 2 | def self.up 3 | create_table(:trigger_strategies_scans, :id => false) do |t| 4 | t.integer :scan_id 5 | t.integer :trigger_strategy_id 6 | end 7 | drop_table :entry_strategies_scans; 8 | end 9 | 10 | def self.down 11 | drop_table :trigger_strategies_scans; 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /vendor/plugins/exception_notification/lib/exception_notifier/views/exception_notifier/_environment.html.erb: -------------------------------------------------------------------------------- 1 | <% filtered_env = @request.filtered_env -%> 2 | <% max = filtered_env.keys.max { |a, b| a.length <=> b.length } -%> 3 | <% filtered_env.keys.sort.each do |key| -%> 4 | * <%=raw "%-*s: %s" % [max.length, key, filtered_env[key].to_s.strip] %> 5 | <% end -%> 6 | 7 | * Process: <%=raw $$ %> 8 | * Server : <%=raw `hostname -s`.chomp %> 9 | -------------------------------------------------------------------------------- /vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/index_definition.rb: -------------------------------------------------------------------------------- 1 | module RedHillConsulting::Core::ActiveRecord::ConnectionAdapters 2 | module IndexDefinition 3 | def case_sensitive? 4 | @case_sensitive.nil? ? true : @case_sensitive 5 | end 6 | 7 | def case_sensitive=(case_sensitive) 8 | @case_sensitive = case_sensitive 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/connection_adapters/sqlite3_adapter.rb: -------------------------------------------------------------------------------- 1 | module RedHillConsulting::Core::ActiveRecord::ConnectionAdapters 2 | module Sqlite3Adapter 3 | def add_foreign_key(table_name, column_names, references_table_name, references_column_names, options = {}) 4 | end 5 | 6 | def remove_foreign_key(table_name, foreign_key_name) 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20090719170151_create_ta_series.rb: -------------------------------------------------------------------------------- 1 | class CreateTaSeries < ActiveRecord::Migration 2 | def self.up 3 | create_table(:ta_series, :options => 'ENGINE=MYISAM') do |t| 4 | t.integer :ticker_id, :references => nil 5 | t.integer :ta_spec_id, :references => nil 6 | t.datetime :stime 7 | t.float :value 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :ta_series 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20090907020132_create_trigger_scans_join_table.rb: -------------------------------------------------------------------------------- 1 | class CreateTriggerScansJoinTable < ActiveRecord::Migration 2 | def self.up 3 | create_table(:scans_trigger_strategies, :id => false) do |t| 4 | t.integer :scan_id 5 | t.integer :trigger_strategy_id 6 | end 7 | drop_table :trigger_strategies_scans; 8 | end 9 | 10 | def self.down 11 | drop_table :scans_trigger_strategies; 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/daily_closes/plot_remote.html.haml: -------------------------------------------------------------------------------- 1 | %h1 2 | Plot Parameters for 3 | = current_object.symbol 4 | 5 | %fieldset 6 | - smart_form_for(current_object, :readonly => true) do |f| 7 | = render :partial => "form", :locals => {:f => f} 8 | 9 | = link_to 'Edit', edit_object_path 10 | | 11 | = link_to 'Destroy', object_path, :confirm => 'Really destroy daily_close?', :method => :delete 12 | | 13 | = link_to 'Back', objects_path 14 | -------------------------------------------------------------------------------- /db/migrate/20090311210559_move_name_field_to_tickers.rb: -------------------------------------------------------------------------------- 1 | class MoveNameFieldToTickers < ActiveRecord::Migration 2 | def self.up 3 | remove_column :current_listings, :name 4 | add_column :tickers, :name, :string 5 | remove_column :tickers, :alias 6 | end 7 | 8 | def self.down 9 | add_column :current_listings, :name, :string 10 | remove_column :tickers, :name 11 | add_column :tickers, :alias 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090904021724_drop_old_date_on_daily_bars.rb: -------------------------------------------------------------------------------- 1 | class DropOldDateOnDailyBars < ActiveRecord::Migration 2 | def self.up 3 | remove_index :daily_bars, :name => :index_daily_bars_on_ticker_id_and_date 4 | remove_column :daily_bars, :old_date 5 | add_index :daily_bars, [:ticker_id, :bartime], :unique => true 6 | end 7 | 8 | def self.down 9 | raise ActiveRecord::IrreversibleMigration 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/contract_types/_contract_type.html.haml: -------------------------------------------------------------------------------- 1 | %tr[contract_type]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h contract_type.name 4 | %td.show 5 | = link_to 'Show', object_path(contract_type) 6 | %td.edit 7 | = link_to 'Edit', edit_object_path(contract_type) 8 | %td.destroy 9 | = link_to 'Destroy', object_path(contract_type), :confirm => 'Really destroy contract_type?', :method => :delete 10 | -------------------------------------------------------------------------------- /app/views/daily_closes/plot_local.html.haml: -------------------------------------------------------------------------------- 1 | %h1 2 | Plot Parameters for 3 | = current_object.symbol 4 | 5 | %fieldset 6 | - smart_form_for(current_object, :readonly => true) do |f| 7 | = render :partial => "plot_form", :locals => {:f => f} 8 | 9 | = link_to 'Edit', edit_object_path 10 | | 11 | = link_to 'Destroy', object_path, :confirm => 'Really destroy daily_close?', :method => :delete 12 | | 13 | = link_to 'Back', objects_path 14 | -------------------------------------------------------------------------------- /app/views/orders/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing orders 2 | %table 3 | %tr.heading 4 | %th Txn 5 | %th Type 6 | %th Expiration 7 | %th Quantity 8 | %th Placed At 9 | %th Filled At 10 | %th Activation Price 11 | %th Order Price 12 | %th Fill Price 13 | %th Ticker 14 | %th Position 15 | 16 | = render :partial => 'order', :collection => current_objects 17 | 18 | = link_to 'New order', new_object_path 19 | -------------------------------------------------------------------------------- /db/migrate/20090307022324_create_derived_values.rb: -------------------------------------------------------------------------------- 1 | class CreateDerivedValues < ActiveRecord::Migration 2 | def self.up 3 | create_table :derived_values do |t| 4 | t.integer :ticker_id 5 | t.integer :derived_value_type_id 6 | t.date :date 7 | t.datetime :time 8 | t.float :value 9 | 10 | t.timestamps 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :derived_values 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20090817220956_change_belong_to_has_one_wach_list.rb: -------------------------------------------------------------------------------- 1 | class ChangeBelongToHasOneWachList < ActiveRecord::Migration 2 | def self.up 3 | remove_column :watch_list, :tda_position_id 4 | add_column :tda_positions, :watch_list_id, :integer, :references => :watch_list 5 | end 6 | 7 | def self.down 8 | add_column :watch_list, :tda_position_id, :integer 9 | remove_column :tda_positions, :watch_list_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20090819163021_rename_macd_in_watch_list.rb: -------------------------------------------------------------------------------- 1 | class RenameMacdInWatchList < ActiveRecord::Migration 2 | def self.up 3 | rename_column :watch_list, :current_macd, :current_macdfix 4 | rename_column :watch_list, :target_macd, :target_macdfix 5 | end 6 | 7 | def self.down 8 | rename_column :watch_list, :current_macdfix, :current_macd 9 | rename_column :watch_list, :target_macdfix, :target_macd 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20091026204637_create_ledger_txns.rb: -------------------------------------------------------------------------------- 1 | class CreateLedgerTxns < ActiveRecord::Migration 2 | def self.up 3 | create_table :ledger_txns, :force => true do |t| 4 | t.float :amount 5 | t.datetime :date 6 | t.integer :type 7 | t.integer :order_id 8 | t.float :balance 9 | t.string :msg 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :ledger_txns 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /test/fixtures/fast_live_quotes.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20090506055841 3 | # 4 | # Table name: fast_live_quotes 5 | # 6 | # ticker_id :integer(4) 7 | # last_trade_time :datetime 8 | # last_trade :float 9 | # volume :integer(4) 10 | # 11 | 12 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 13 | 14 | # one: 15 | # column: value 16 | # 17 | # two: 18 | # column: value 19 | -------------------------------------------------------------------------------- /db/migrate/20090618181203_add_version_to_study.rb: -------------------------------------------------------------------------------- 1 | class AddVersionToStudy < ActiveRecord::Migration 2 | def self.up 3 | add_column :studies, :version, :integer 4 | add_column :studies, :sub_version, :integer 5 | add_column :studies, :iteration, :integer 6 | end 7 | 8 | def self.down 9 | remove_column :studies, :version 10 | remove_column :studies, :sub_version 11 | remove_column :studies, :iteration 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20091029212126_create_sim_summaries.rb: -------------------------------------------------------------------------------- 1 | class CreateSimSummaries < ActiveRecord::Migration 2 | def self.up 3 | create_table :sim_summaries, :force => true do |t| 4 | t.date :sim_date 5 | t.integer :positions_held 6 | t.integer :positions_available 7 | t.float :portfolio_value 8 | t.float :cash_balance 9 | end 10 | end 11 | 12 | def self.down 13 | drop_table :sim_summaries 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /lib/tests/eventmachine/echo: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'rubygems' 4 | require 'eventmachine' 5 | 6 | module EchoServer 7 | def receive_data(data) 8 | send_data(data) 9 | end 10 | end 11 | 12 | EventMachine::run do 13 | host = '127.0.0.1' 14 | port = 8080 15 | EventMachine::start_server host, port, EchoServer 16 | puts "Started EchoSever on #{host}:#{port}" 17 | end 18 | 19 | # Local Variables: 20 | # mode:ruby 21 | # End: 22 | -------------------------------------------------------------------------------- /app/views/positions/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing positions 2 | %table 3 | %tr.heading 4 | %th Portfolio 5 | %th Ticker 6 | %th Open 7 | %th Entry Date 8 | %th Exit Date 9 | %th Entry Price 10 | %th Exit Price 11 | %th Num Shares 12 | %th Contract Type 13 | %th Side 14 | %th Stop Loss 15 | 16 | = render :partial => 'position', :collection => current_objects 17 | 18 | = link_to 'New position', new_object_path 19 | -------------------------------------------------------------------------------- /test/fixtures/ta_specs.yml: -------------------------------------------------------------------------------- 1 | # == Schema Information 2 | # Schema version: 20100205165537 3 | # 4 | # Table name: ta_specs 5 | # 6 | # id :integer(4) not null, primary key 7 | # indicator_id :integer(4) 8 | # time_period :integer(4) 9 | # 10 | 11 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html 12 | 13 | one: 14 | indicator_id: 1 15 | time_period: 1 16 | 17 | two: 18 | indicator_id: 1 19 | time_period: 1 20 | -------------------------------------------------------------------------------- /vendor/plugins/acl_system2/lib/caboose/role_handler.rb: -------------------------------------------------------------------------------- 1 | module Caboose 2 | 3 | class AccessHandler 4 | include LogicParser 5 | 6 | def check(key, context) 7 | false 8 | end 9 | 10 | end 11 | 12 | class RoleHandler < AccessHandler 13 | 14 | def check(key, context) 15 | context[:user].roles.map{ |role| role.title.downcase}.include? key.downcase 16 | end 17 | 18 | end # End RoleHandler 19 | 20 | end -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/migration.rb: -------------------------------------------------------------------------------- 1 | class <%= migration_name %> < ActiveRecord::Migration 2 | def self.up 3 | create_table :<%= table_name %>, :force => true do |t| 4 | <% for attribute in attributes -%> 5 | t.<%= attribute.type %> :<%= attribute.name %> 6 | <% end -%> 7 | t.timestamps 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :<%= table_name %> 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20081230225836_create_plot_attributes.rb: -------------------------------------------------------------------------------- 1 | class CreatePlotAttributes < ActiveRecord::Migration 2 | def self.up 3 | create_table :plot_attributes, :force => true do |t| 4 | t.string :name 5 | t.integer :ticker_id 6 | t.string :type 7 | t.datetime :anchor_date 8 | t.integer :period 9 | t.string :attributes 10 | end 11 | end 12 | 13 | def self.down 14 | drop_table :plot_attributes 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20090729181214_add_columns_to_watch_list.rb: -------------------------------------------------------------------------------- 1 | class AddColumnsToWatchList < ActiveRecord::Migration 2 | def self.up 3 | add_column :watch_list, :snapshots_above, :integer, :default => 0, :null => false 4 | add_column :watch_list, :snapshots_below, :integer, :default => 0, :null => false 5 | end 6 | 7 | def self.down 8 | remove_column :watch_list, :snapshots_below 9 | remove_column :watch_list, :snapshots_above 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /vendor/plugins/squirrel/test/database.yml: -------------------------------------------------------------------------------- 1 | sqlite3_file: 2 | adapter: sqlite3 3 | dbfile: squirrel.sqlite.db 4 | sqlite3: 5 | adapter: sqlite3 6 | database: ":memory:" 7 | postgresql: 8 | adapter: postgresql 9 | username: postgres 10 | password: postgres 11 | database: squirrel_test 12 | min_messages: ERROR 13 | mysql: 14 | adapter: mysql 15 | host: localhost 16 | username: squirrel 17 | password: squirrel 18 | database: squirrel_test 19 | -------------------------------------------------------------------------------- /app/views/listing_categories/_listing_category.html.haml: -------------------------------------------------------------------------------- 1 | %tr[listing_category]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h listing_category.name 4 | %td.show 5 | = link_to 'Show', object_path(listing_category) 6 | %td.edit 7 | = link_to 'Edit', edit_object_path(listing_category) 8 | %td.destroy 9 | = link_to 'Destroy', object_path(listing_category), :confirm => 'Really destroy listing_category?', :method => :delete 10 | -------------------------------------------------------------------------------- /db/migrate/20081217012719_add_returns_to_daily_close.rb: -------------------------------------------------------------------------------- 1 | class AddReturnsToDailyClose < ActiveRecord::Migration 2 | def self.up 3 | add_column :daily_closes, :return, :float 4 | add_column :daily_closes, :log_return, :float 5 | add_column :daily_closes, :alr, :float 6 | end 7 | 8 | def self.down 9 | remove_column :daily_closes, :alr 10 | remove_column :daily_closes, :log_return 11 | remove_column :daily_closes, :return 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20090528012055_add_triggers_to_position.rb: -------------------------------------------------------------------------------- 1 | class AddTriggersToPosition < ActiveRecord::Migration 2 | def self.up 3 | add_column :positions, :entry_trigger, :float 4 | add_column :positions, :exit_trigger, :float 5 | remove_column :positions, :week 6 | end 7 | 8 | def self.down 9 | remove_column :positions, :exit_trigger 10 | remove_column :positions, :entry_trigger 11 | add_column :positions, :week, :integer 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/unit/rail_time_quote_worker_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/backgroundrb.rb" 3 | require "#{RAILS_ROOT}/lib/workers/rail_time_quote_worker" 4 | require 'drb' 5 | 6 | class RailTimeQuoteWorkerTest < Test::Unit::TestCase 7 | 8 | # Replace this with your real tests. 9 | def test_truth 10 | assert RailTimeQuoteWorker.included_modules.include?(DRbUndumped) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /vendor/plugins/make_resourceful/generators/resourceful_scaffold/templates/view_show.haml: -------------------------------------------------------------------------------- 1 | %h1 Viewing <%= singular_name.titleize %> 2 | 3 | %fieldset 4 | - smart_form_for(current_object, :readonly => true) do |f| 5 | = render :partial => "form", :locals => {:f => f} 6 | 7 | = link_to 'Edit', edit_object_path 8 | | 9 | = link_to 'Destroy', object_path, :confirm => 'Really destroy <%= singular_name %>?', :method => :delete 10 | | 11 | = link_to 'Back', objects_path 12 | -------------------------------------------------------------------------------- /vendor/plugins/will_paginate/test/fixtures/topic.rb: -------------------------------------------------------------------------------- 1 | class Topic < ActiveRecord::Base 2 | has_many :replies, :dependent => :destroy, :order => 'replies.created_at DESC' 3 | belongs_to :project 4 | 5 | named_scope :mentions_activerecord, :conditions => ['topics.title LIKE ?', '%ActiveRecord%'] 6 | 7 | named_scope :with_replies_starting_with, lambda { |text| 8 | { :conditions => "replies.content LIKE '#{text}%' ", :include => :replies } 9 | } 10 | end 11 | -------------------------------------------------------------------------------- /app/views/portfolios/_portfolio.html.haml: -------------------------------------------------------------------------------- 1 | %tr[portfolio]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h portfolio.name 4 | %td.initial_value 5 | = h portfolio.initial_value 6 | %td.show 7 | = link_to 'Show', object_path(portfolio) 8 | %td.edit 9 | = link_to 'Edit', edit_object_path(portfolio) 10 | %td.destroy 11 | = link_to 'Destroy', object_path(portfolio), :confirm => 'Really destroy portfolio?', :method => :delete 12 | -------------------------------------------------------------------------------- /db/migrate/20081231001734_create_plot_types.rb: -------------------------------------------------------------------------------- 1 | class CreatePlotTypes < ActiveRecord::Migration 2 | def self.up 3 | create_table :plot_types, :force => true do |t| 4 | t.string :name 5 | t.string :source_model 6 | t.string :method 7 | t.string :time_class 8 | t.string :resolution 9 | t.string :inputs 10 | t.integer :num_outputs 11 | end 12 | end 13 | 14 | def self.down 15 | drop_table :plot_types 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20090823015126_create_position_series.rb: -------------------------------------------------------------------------------- 1 | class CreatePositionSeries < ActiveRecord::Migration 2 | def self.up 3 | create_table :position_series, :force => true, :options => "ENGINE=MYISAM" do |t| 4 | t.integer :position_id, :references => nil 5 | t.integer :indicator_id, :references => nil 6 | t.date :date 7 | t.float :value 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :position_series 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/studies/_study.html.haml: -------------------------------------------------------------------------------- 1 | %tr[study]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h study.name 4 | %td.start_date 5 | = h study.start_date 6 | %td.end_date 7 | = h study.end_date 8 | %td.show 9 | = link_to 'Show', object_path(study) 10 | %td.edit 11 | = link_to 'Edit', edit_object_path(study) 12 | %td.destroy 13 | = link_to 'Destroy', object_path(study), :confirm => 'Really destroy study?', :method => :delete 14 | -------------------------------------------------------------------------------- /db/migrate/20090608195510_add_open_flag_to_strategies.rb: -------------------------------------------------------------------------------- 1 | class AddOpenFlagToStrategies < ActiveRecord::Migration 2 | def self.up 3 | rename_column :strategies, :params_yaml, :open_params_yaml 4 | rename_column :strategies, :description, :open_description 5 | add_column :strategies, :close_params_yaml, :string 6 | add_column :strategies, :close_description, :string 7 | end 8 | 9 | def self.down 10 | remove_column :strategies, :type 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /doc/WISH_LIST: -------------------------------------------------------------------------------- 1 | * Keep one-minute bars for symbols which pass the scans 2 | * Change "liquid" statements in decade to compute dollar*volume and then use this as a threshold for the scan 3 | * Ability to specify expressions to the simulator that modify the chooser thresholds based upon things like available cash. 4 | * Ability to detect daily_bar ouliers and replace with google/yohoo data 5 | ** Could be used to detect splits and update the back-update the daily bars table with split info 6 | -------------------------------------------------------------------------------- /test/unit/daily_query_worker_worker_test.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/../test_helper' 2 | require "#{RAILS_ROOT}/vendor/plugins/backgroundrb/backgroundrb.rb" 3 | require "#{RAILS_ROOT}/lib/workers/daily_query_worker_worker" 4 | require 'drb' 5 | 6 | class DailyQueryWorkerWorkerTest < Test::Unit::TestCase 7 | 8 | # Replace this with your real tests. 9 | def test_truth 10 | assert DailyQueryWorkerWorker.included_modules.include?(DRbUndumped) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/views/aggregations/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing aggregations 2 | %table 3 | %tr.heading 4 | %th Ticker 5 | %th Date 6 | %th Open 7 | %th Close 8 | %th High 9 | %th Low 10 | %th Adj Close 11 | %th Volume 12 | %th Week 13 | %th Month 14 | %th Sample Count 15 | %th Created At 16 | %th Updated At 17 | 18 | = render :partial => 'aggregation', :collection => current_objects 19 | 20 | = link_to 'New aggregation', new_object_path 21 | -------------------------------------------------------------------------------- /app/views/derived_value_types/_derived_value_type.html.haml: -------------------------------------------------------------------------------- 1 | %tr[derived_value_type]{:class => cycle('list-line-even', 'list-line-odd')} 2 | %td.name 3 | = h derived_value_type.name 4 | %td.show 5 | = link_to 'Show', object_path(derived_value_type) 6 | %td.edit 7 | = link_to 'Edit', edit_object_path(derived_value_type) 8 | %td.destroy 9 | = link_to 'Destroy', object_path(derived_value_type), :confirm => 'Really destroy derived_value_type?', :method => :delete 10 | -------------------------------------------------------------------------------- /app/views/sim_positions/index.html.haml: -------------------------------------------------------------------------------- 1 | %h1 Listing sim_positions 2 | %table 3 | %tr.heading 4 | %th Entry Date 5 | %th Exit Date 6 | %th Quantity 7 | %th Entry Price 8 | %th Exit Price 9 | %th Nreturn 10 | %th Roi 11 | %th Days Held 12 | %th Eorder 13 | %th Xorder 14 | %th Ticker 15 | %th Position 16 | 17 | = render :partial => 'sim_position', :collection => current_objects 18 | 19 | = link_to 'New sim_position', new_object_path 20 | -------------------------------------------------------------------------------- /db/migrate/20100123024049_create_ann_inputs.rb: -------------------------------------------------------------------------------- 1 | class CreateAnnInputs < ActiveRecord::Migration 2 | def self.up 3 | create_table :ann_inputs do |t| 4 | t.float :O 5 | t.float :H 6 | t.float :L 7 | t.float :C 8 | t.float :RSI 9 | t.integer :V 10 | t.float :RVIG 11 | t.float :MACD 12 | t.float :O0 13 | 14 | t.timestamps 15 | end 16 | end 17 | 18 | def self.down 19 | drop_table :ann_inputs 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /db/migrate/20100205165537_create_indicator_values.rb: -------------------------------------------------------------------------------- 1 | class CreateIndicatorValues < ActiveRecord::Migration 2 | def self.up 3 | create_table :indicator_values, :force => true do |t| 4 | t.integer :indicator_id, :references => nil 5 | t.references :valuable, :polymorphic => true, :references => nil 6 | t.datetime :itime 7 | t.float :value 8 | end 9 | end 10 | 11 | def self.down 12 | drop_table :indicator_values 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /public/stylesheets/admin.css: -------------------------------------------------------------------------------- 1 | body { background-color: #fff; color: #333; } 2 | 3 | body, p, ol, ul, td { 4 | font-family: verdana, arial, helvetica, sans-serif; 5 | font-size: 13px; 6 | line-height: 18px; 7 | } 8 | 9 | pre { 10 | background-color: #eee; 11 | padding: 10px; 12 | font-size: 11px; 13 | } 14 | 15 | a { color: #000; } 16 | a:visited { color: #666; } 17 | a:hover { color: #fff; background-color:#000; } 18 | 19 | #ticker_symbol { color: red; size: 5em; } 20 | -------------------------------------------------------------------------------- /vendor/plugins/delayed_job/spec/story_spec.rb: -------------------------------------------------------------------------------- 1 | require File.dirname(__FILE__) + '/database' 2 | 3 | describe "A story" do 4 | 5 | before(:all) do 6 | @story = Story.create :text => "Once upon a time..." 7 | end 8 | 9 | it "should be shared" do 10 | @story.tell.should == 'Once upon a time...' 11 | end 12 | 13 | it "should not return its result if it storytelling is delayed" do 14 | @story.send_later(:tell).should_not == 'Once upon a time...' 15 | end 16 | 17 | end -------------------------------------------------------------------------------- /db/migrate/20081227180640_create_aggregates.rb: -------------------------------------------------------------------------------- 1 | class CreateAggregates < ActiveRecord::Migration 2 | def self.up 3 | create_table :aggregates do |t| 4 | t.integer :ticker_id 5 | t.date :date 6 | t.datetime :start 7 | t.float :open 8 | t.float :close 9 | t.float :high 10 | t.float :low 11 | t.integer :volume 12 | t.integer :period 13 | end 14 | end 15 | 16 | def self.down 17 | drop_table :aggregates 18 | end 19 | end 20 | --------------------------------------------------------------------------------