Your SlideShare is downloading. ×
Company Tracker
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Company Tracker

269
views

Published on

Company Tracker is a database of companies and their key financial …

Company Tracker is a database of companies and their key financial
ratios. It’s compatible with Reuter’s Kobra data exported in tab
delimited format and also with Google Finance.


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
269
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Company Tracker | CIS 4100 May 18, 2009 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 2. Overview 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
    • Purposes
    • Track Company Financial Data
    • Compare a fundamentals
      • PE
      • EPS
      • Dividend Yields
      • ROE
      • And other ratios
    • Evaluate Technical Data
      • Visualize Historical Data
  • 3. Program Design Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 4. Importing Data
    • Reuters Data Compatible through Excel tab delimited files
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 5. Importing Data
    • Tab Delimited Files
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 6. Importing Data
    • Loading data after a compatible file has been loaded. Notice how the RIC from Reuters has been change to a standard ticker, and company name has been formatted to lowercase.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 7. Browse Button 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* creating new open file dialog box*/ OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog(); /* setting filters for compatible data*/ openFileDialog1->Filter = "Text File (Tab Delimited)|*.txt"; openFileDialog1->Title = "Select a File"; /*the dialog box is shown automatically*/ /*when the dialog box is closed get the file path*/ if(openFileDialog1->ShowDialog() == System::Windows::Forms::DialogResult::OK){ /*get the path received into the textbox*/ txtPath->Text = openFileDialog1->FileName; }
  • 8. Importing Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 companyImportList->Add(gcnew CCompany(columns[0], columns[1], columns[2], Convert::ToInt64(columns[4]), Convert::ToDouble(columns[5]), Convert::ToDouble(columns[6]), Convert::ToDouble(columns[8]), Convert::ToDouble(columns[9]), Convert::ToDouble(columns[10]), Convert::ToDouble(columns[11]))); CompaniesDB->ImportCompanies(companyImportList); companyImportList = gcnew List<CCompany^>(); StreamReader
  • 9. Importing Data
    • Text files must have twelve columns of data.
    • Data consistency and program stability.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 10. Checking Compatibility 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // read contents of file while(txtIn->Peek() != -1){ // read lines of text String^ row = txtIn->ReadLine(); // split line to find # of columns array<String^>^ columns = row->Split(' '); /*checks if the file is compatible*/ if(columns->Length!=12){ MessageBox::Show(&quot;The selected file is not compatible.&quot;, &quot;Error Reading File&quot;, MessageBoxButtons::OK ,MessageBoxIcon::Error); break; }else{…….}
  • 11. Company Management
    • Mimics a Database using classes to load and save list of company objects into text files
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 12. Program Design: Company Management Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 13. Company Management: Sorting Companies
    • Using a ListView control and a ListViewItemSorter class, data can be sorted. This allows company performance comparison.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 14. Sorting Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // creates a list view item comparer CListViewItemComparer^ lviComparer = gcnew CListViewItemComparer(e- >Column); // set the order and apply it to the listview control if(e->Column == lastColSorted){…… } //apply the comparer to the listview listView1->ListViewItemSorter = lviComparer ; //set flags lastColSorted = e->Column; lastSortOrder = lviComparer->Order; //apply row colors to list view AlternateRowColorListView();
  • 15. Company Management: Searching Companies
    • The user can search for companies using the search box. While text is being entered the possible matches are highlighted in the company list.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 16. Searching a Company 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* get item from listview */ ListViewItem^ resultLvItem = listView1-> FindItemWithText(ticker); if(resultLvItem != nullptr){ /* select item and ensure is visible */ resultLvItem->Selected = true; listView1->EnsureVisible(resultLvItem->Index); }
  • 17. Company Management: Adding Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
    • Dropdown combo box allows easily selection of sectors.
    • Sectors are loaded using a Sectors object
  • 18. Company Management: Adding Companies
    • Data validation allows data consistency and offers aid to the user when manually adding companies.
    • If a company already exists in the database, inform the user and prevent adding the duplicate data.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 19. Adding a Company to the DB 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 frmAddCompany^ FAddCompany = gcnew frmAddCompany(); CCompany^ newCompany = FAddCompany->GetNewCompany(); /* if the company object received is not null save it*/ if(newCompany != nullptr){ /* check if the company exists*/ if(CompaniesDB->CompanyExists(newCompany)){ MessageBox::Show(&quot;The company &quot; + newCompany- >Ticker + &quot; already exists.&quot;,&quot;Company Already Exists&quot;); }else{ /*adding company*/ CompaniesDB->AddCompany(newCompany); /* update list view*/ UpdateListView(); } }
  • 20. Company Management: Editing Companies
    • Companies can be edited by selecting a company from the database and clicking on the edit button.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 21. Editing Companies 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // get the selected item ListViewItem^ itemSelected = listView1->SelectedItems[0]; CCompany^ selectedCompany = CompaniesDB->GetCompany(itemSelected->Text); frmAddCompany^ FEditCompany = gcnew frmAddCompany(); CCompany^ editedCompany = FEditCompany->EditCompany(selectedCompany); if(editedCompany != nullptr){ /* replace company */ CompaniesDB->AddCompany(editedCompany); CompaniesDB->RemoveCompany(selectedCompany); /* update listview*/ UpdateListView();
  • 22. Company Management: Deleting Companies
    • To delete a company from the database just select it and click delete, after the confirmation appears click yes.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 23. Deleting a company 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // get the selected item ListViewItem^ itemSelected = listView1->SelectedItems[0]; CCompany^ selectedCompany = CompaniesDB->GetCompany(itemSelected->Text); if(selectedCompany != nullptr){ // get delete confirmation String^ msg = &quot;Are you sure you want to delete &quot; + selectedCompany->Ticker + &quot;?&quot;; ::DialogResult button = MessageBox::Show(msg, &quot;Comfirm Delete&quot;, MessageBoxButtons::YesNo); if(button == ::DialogResult::Yes){ CompaniesDB->RemoveCompany(selectedCompany); UpdateListView(); }
  • 24. Company Details 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 25. SendToCompanyDetails(Ccompany) 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 // make sure the detail's form for that company is closed if(!IsCompanyDetailsOpen(someCompany->Ticker)){ // initialize and show child form /*setting child window*/ FCompanyDetails = gcnew frmCompanyDetails(); FCompanyDetails->MdiParent = this->MdiParent; FCompanyDetails->Text = someCompany->Ticker + &quot; - Company Details&quot;; /* setting position */ FCompanyDetails->StartPosition = FormStartPosition::CenterParent; /*send company to form */ FCompanyDetails->DisplayCompany(someCompany); FCompanyDetails->Show();
  • 26. Company Details: Overview
    • Displays Fundamentals, competitors and a chart to visualize historical quotes.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 27. Company Details: Downloading Quotes
    • After clicking the button data is automatically downloaded and stored in the hard drive for future reference.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 28. Downloading Quotes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ticker = ticker->ToUpper(); String^ downloadFolder = &quot;C://files//FINA//PRICEDATA//&quot;+ ticker +&quot;.csv&quot;; String^ website = &quot;http://www.google.com/finance/historical?q=&quot; + ticker + &quot;&output=csv&quot;; try{ /* creates a new WebClient object */ WebClient^ wc = gcnew WebClient(); /* download file to assign download folder */ wc->DownloadFile(website,downloadFolder); /* if file downloaded successfully */ MessageBox::Show(&quot;Company data for &quot; + ticker + &quot; downloaded successfully.&quot;, &quot;Data Downloaded&quot;); /* get a company object from the label ticker and redraw a chart*/ DrawChart(someCompany); }catch(WebException^ e ){/* File could not be downloaded */...}
  • 29. Program Design: Sectors and Historical Data 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 /* load companies from file into memory */ CompaniesDB->LoadCompanies(); /* get a list of companies by sector */ List<CCompany^>^ companiesBySectorList = CompaniesDB->GetCompaniesBySector(someCompany->Sector); /* get historical data */ List<COHLC^>^ ohlcList = someCompany->GetHistoricalData();
  • 30. Charting Data 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 if(someCompany->HistoricalDataExists()) { /* setting chart style */ chart1->Series[&quot;Prices&quot;]->ChartType = SeriesChartType::Line; /* enable chart options */ groubBxChartOptions->Enabled = true; rdbtnLine->Checked = true; /*Historical Data Status */ lblHistoricalDataStatus->Text += &quot; was last updated on: &quot; + someCompany->HistoricaDataLastUpdated(); /* set series to be drawn in the chart*/ for each(COHLC^ item in ohlcList){ chart1->Series[&quot;Prices&quot;]->Points->AddXY( item->Date,item->Open, item->High,item->Low, item->Close); }…}
  • 31. Company Details Chart
    • Company details, displays fundamental data along competitors and a chart of the historical prices for the last year.
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 32. Company Details Chart Options 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 33. Company Details Chart Options
    • Line chart, last three months
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 34. 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 Company Details Chart Options
    • Stock chart, last three months
  • 35. Company Details Chart Options 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
    • Candlestick style and three months back.
  • 36. Viewing Multiple Companies
    • MDI Applications: Multiple Document Interface
    10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 37. Program Design: Tracking Events Class 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 38. Tracking Events: Adding Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 39. Adding Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 ListViewItem^ lvitem = gcnew ListViewItem(dtpDate->Value.ToShortDateString()); lvitem->SubItems->Add(txtTicker->Text->ToUpper()); lvitem->SubItems->Add(txtEvent->Text); lvEvents->Items->Add(lvitem); EventsDB->SaveEvents(); /*initialize Events DB */ EventsDB = gcnew CCalendarEvents(); /* link the DB to a list view control */ EventsDB->LinkToListView = lvEvents; /* load all data into the liked listview*/ EventsDB->FillEvents();
  • 40. Tracking Events: Viewing and Deleting Events 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 41. Program Design: Other Classes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009
  • 42. File Structure 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 Directory Companies.txt events.txt
  • 43. File Structure: Historical Quotes 10/10/10 Jaime Moran - CIS 4100 - Spring 2009 GOOG.csv

×