Stock Analysis - Momentum

89 views
Skip to first unread message

Bert Mariani

unread,
Dec 11, 2025, 2:43:14 PM (7 days ago) Dec 11
to The Ring Programming Language
Hello Azzedine, Mahmoud

Attached:
 StockAnalysis-BM.ring       // Main Program
 StockYearlyReturns.ring
 StockDrawChart.ring

 Quotes.ini                         
  // Tickers
 Quotes-Mega-32.ini
 Quotes-Mega-62.ini
 Quotes-Mega-160.ini

 AppIcon.png

 AAA-Spread.csv                // Fetch Ticker Data saved.

The Stock Tickers can be found at: 

To RUN the App
     -  Start  StockAnalysis-BM.ring    
     -  Click "Get Quotes"     fetches the historical data for the list of Tickers
     -  Click "Run Analysis"  invokes the algorithn to select the top stocks

Theory
     Based on Current Month  minus Month-7 prices
     Calc the Performance of each Stock
     Sort the Performance for every Month moving forward
     Buy the Stocks that are Ranked as the Top10  List  next month
     Sell if the Stock is Below the Top10
     Repeat Once a Month.

Analysis
     Showed that Buy the Top-7 stocks based on the
      Performance over a Period of 7 Month gives balanced results.

Caveat:
     Past Performance does NOT imply Future Performance.

Playing With Parms
     First - Download data  with  "Get Quotes"  button
     Second - Analyses data with  "Run Analysis" button

     The Parameters for TopTen (7)  and RangeMth (7) can be changed
      And the "Run Analysis" button will show the Results.

Debugging  flag can be TOOGLED  using the "DEBUG"  drop down
     "Array-Data"    
    "Performance"  
     "Sort"          
     "Sort-Name"    
     "Rank"          
     "Buy-Price"    
      "Gain"          
      "Monthly-Perf"  
     "Compound"      
     "Summary-Stock"
     "Summary-Total"
     "Show-Top10"    
      "Gain-Details"  

TRUST BUT VERIFY !!!

=======================================
Quotes-Mega-62.ini     Top = 7     RangeMth = 7

StockAnalysisChart-1.png

     


Quotes-Mega-62.ini
AppIcon.png
Quotes-Mega-160.ini
Quotes.ini
AAA-Spread.csv
StockAnalysis-BM.ring
Quotes-Mega-32.ini
StockDrawChart.ring
StockYearlyReturns.ring

Mahmoud Fayed

unread,
Dec 11, 2025, 6:20:52 PM (7 days ago) Dec 11
to The Ring Programming Language
Hello Bert

Thank you very much for sharing :D

Providing a RingPM Package will be much easier for installing/testing and getting updates 

Greetings,
Mahmoud

Azzeddine Remmal

unread,
Dec 11, 2025, 7:32:00 PM (7 days ago) Dec 11
to The Ring Programming Language
Hello Bert

Great app updates
Thank you very much for sharing

Best regards

Bert Mariani

unread,
Dec 13, 2025, 12:07:10 PM (6 days ago) Dec 13
to The Ring Programming Language
Hello Mahmoud et ALL

StockAnalysis-BM   App

Files uploaded to Git Hub
RingPM created.

GitHub:  Files
     https://github.com/umariani/StockAnalisis-BM

Package Manager:  Install on Ring
      ringpm install StockAnalysis-BM from umariani

Ring Directory
      C:\ring\tools\ringpm\packages\StockAnalisis\StockAlalysis-BM.ring

( Comment:  Tedious and convoluted. )

Mahmoud Fayed

unread,
Dec 13, 2025, 11:04:56 PM (5 days ago) Dec 13
to The Ring Programming Language
Hello Bert

>> "  ringpm install StockAnalysis-BM from umariani"

This doesn't work, you need to add (package.ring) file to the project folder, so RingPM can install the package


You can start by opening the project folder then typing the next command
ringpm package

This will create package.ring

Also, You can check the package for StockAnalysis project (before your updates): ringpackages/stockanalysis: StockAnalysis package for the Ring programming language


The package is designed to install the files in ring/applications/stockanalysis folder: stockanalysis/applications/stockanalysis at main · ringpackages/stockanalysis

So, you can update your package to install the files in ring/applications/sockanalysis-bm folder

Greetings,
Mahmoud

Bert Mariani

unread,
Dec 14, 2025, 8:51:15 AM (5 days ago) Dec 14
to The Ring Programming Language
Hello Mahmoud

I had followed the steps in my notes.
At the end the Files all showed up in -- 
          C:\ring\tools\ringpm\packages\StockAnalisis\StockAlalysis-BM.ring
So I thought it worked

I think a separate  more step-by-step procedure is needed in the Ring Documentation
First an overall summary then detailed section
     - Stating with  File A B and C .ring   etc  in the Laptop Directory
     - What to do in GitHub ( Adding, Deleting, Rename )
     - What to do back in the Laptop
     - The back and forth between  GitHub,  Ring Commands,  Laptop Directory
     - What files to edit/modify when in the Steps

       - EDIT......:  package.ring
         Remove:  lib.ring
         Remove:  Main.ring
         Change:  :run to    :run = "ring CodeFormatter.ring",
         Update:  Version in 2 Places

| Steps  ==>   Laptop Directory   <==>   GitHub  |<==>   Ring Commands and Editing  |


Bert Mariani

unread,
Dec 14, 2025, 9:30:56 AM (5 days ago) Dec 14
to The Ring Programming Language
Hello Mahmoud

Added  "package.ring"     (that was on my Laptop Directory from yesterday)
     From:  Laptop/Directory
     To:      GitHub  --  StockAnalisis-BM  repertoire 

AddPackage-1.png

Mahmoud Fayed

unread,
Dec 14, 2025, 9:50:16 PM (4 days ago) Dec 14
to The Ring Programming Language
Hello Bert

There are missing files, I get the next output when trying to install the package using RingPM

error.png

Also, file name (StockAnalyis-BM.bat) miss the (s) character, i.e. StockAnalysis-BM.bat

Greetings,
Mahmoud

Bert Mariani

unread,
Dec 15, 2025, 11:27:03 AM (4 days ago) Dec 15
to The Ring Programming Language
Hello Mahmoud

I deleted the Old GitHub repertoire and started from scratch

Did ALL the ring commands in my Laptop Directory
Edited all the file contents
Then connected to GitHub
Created the New repertoire and uploaded ALL the files. 

c:\>ringpm install Stock-Analysis-BM from umariani

Installing Stock-Analysis-BM (master) ---> Stock-Analysis-BM (1.0.0)
Download Package Files For Stock-Analysis-BM
Download File : AAA-Spread.csv
Download File : AppIcon.png
Download File : Quotes-Mega-160.ini
Download File : Quotes-Mega-250.ini
Download File : Quotes-Mega-32.ini
Download File : Quotes-Mega-500.ini
Download File : Quotes-Mega-62.ini
Download File : Quotes-Mega-900.ini
Download File : Quotes.ini
Download File : Stock-Analysis-BM.bat
Download File : Stock-Analysis-BM.ring
Download File : Stock-Analysis-Chart-1.png
Download File : Stock-DrawChart.ring
Download File : Stock-YearlyReturns.ring

Mahmoud Fayed

unread,
Dec 15, 2025, 11:55:16 AM (4 days ago) Dec 15
to The Ring Programming Language
Hello Bert

Very nice, work as expected :D

Suggestion: Update the README.md file to explain installing the app using RingPM

stock.png

Greetings,
Mahmoud

Bert Mariani

unread,
Dec 15, 2025, 5:51:45 PM (3 days ago) Dec 15
to The Ring Programming Language
Hello Mahmoud, Azzeddine

Updated the GuiHub  ReadMe.

Many thanks to Azzeddine for:
   -  The Look of the QT Display !
   -  Chart display code

Azzeddine Remmal

unread,
Dec 15, 2025, 6:08:54 PM (3 days ago) Dec 15
to The Ring Programming Language
Hello Bert.

You're welcome.
I believe that helping each other as team members is a sacred duty.

Best regards.Azzeddine

Reply all
Reply to author
Forward
0 new messages