Point and Figure Code
Brought to you by:
usacoder
Point and Figure Java API
Joe McVerry
-----
With the 20210204 release, the package uses a properties
file. The properties file directs the package to your stock
price service provider. Currently, two providers are defined
in the package AlphaVantage and Tiingo.
In the previous version, you were required to pass your
service provider API key when making calls to the package API.
With this version, the system stores your key in the properties
file. BE FOREWARNED, THIS IS NOT SECURE AND IF YOU DO
NOT WANT YOUR API KEY STORED THIS WAY DO NOT USE THIS PACKAGE.
To use the properties file, you must run the ServiceProperties program.
The program will prompt you for which of the two providers you are
using and ask for your API key.
Source code is documented.
The package requires Java and another open-source package named JExcelAPI.
Downloaded the package at http://jexcelapi.sourceforge.net
There are two ways to use the Point and Figure package from the
command line. The first and newest way is to use the command-line
scripts included with the package. These scripts will call the
PAFSpreadsheet class. This method will generate an Excel spreadsheet.
The second and original way is to use the main method in the
PointAndFigure class. This method will produce a CSV file that you
can cut and paste into a spreadsheet.
1) You can run the PAFSpreadsheet class from a command line. The
program will continually prompt you for a symbol and will generate
an XLS file with the symbol as the primary file name.
/* windows example /*
PAFSpreadsheet
/* *unix example */
./PAFSpreadsheet
1.a) PAFSpreadsheet class (not batch command file) accept one argument.
You will need to update the batch command file to pass the arguments to
the executable class.
1.a.1)-saveDirectory=xxx
where xxx is the name of the directory where the
spreadsheet csv file is stored.
2) You can run the PointAndFigure class from a command line. The
main method can be passed one argument.
example: java com.americancoders.PointAndFigure
If no argument is passed, the method will use data from the
FakeStockData class.
example: java com.americancoders.PointAndFigure -sym
The first and only argument is -sym the method will prompt you
for a stock symbol and dump its results to System output file.
example: java com.americancoders.PointAndFigure "somestocksymbol"
Please email all comments, update suggestions and questions to
jmcverry@americancoders.com
Release 20230315
Added YahooFinance API to services.
Updated Maven pom.xml file to make the project more Mavenish.
Updated to use Junit 5 libraries.
Release 20210123
Corrected bug in PAFColumn that caused infinite loop.
Replaced Yahoo Quotes with Alpha Vantage, you
will need an Alpha Vantage key (https://www.alphavantage.co/support/#api-key)
Updated array processing to use Java streams and Collections.
----
Release 20170515
Update PAFSpreadsheet to include -saveDirectory argument. The
.xls files will be stored in the directory specified.
The counter for Reversals was adding to the wrong Bear/Bull count.
----
Release 20120928
Changed the High-Low logic to follow specifications as defined by
Jeremy du Plessis book "The Definitive Guide to Point and Figure",
page 94.
----
Release 20120416
Added volume to the entire process. Volume is used in the
PAFSpreadsheet program to display total volume for each
period.
----
Release 20120225
Added two optional arguments to PAFSpreadSheet
1) -google use this to use the Google URL.
2) -days=xxx where xxx is the number of calendarydays to fetch,
default value is 360.
Removed abiltity to pass a prebuilt StockData array to GetStockData
class.
----
Release 20120103
Changed the Yahoo URL in GetStockData.java
----
Release 20110212
Added command line function to call PAFSpreadsheet.
----
Release 20110212
Yahoo price adjustment bug.
----
Release 20110127
Turns out Yahoo Quote Historical Data download requires adjusting
for dividends and stock splits.
----
Release 20110104
Added logic to pull data from Google. To do this set a system
property to System.getProperty("useGoogle") yes, true or 1.
----
Release 20100715
Added new analysis: SpreadTripleTop, SpreadTripleBottom
HighPole and LowPoleReversal
----
Release 20100515
Added indicators and added text formatting in Excel spreadsheets.
----
Release 20100423
Replaced CSV spreadsheet function with a class that builds
Excel spreadsheets. This new function requires the open source
package JExcel see http://jexcelapi.sourceforge.net for further
information.
----
Release 20100305
Improved CSV spreadsheet output. Month value shows up in column
and only the year is displayed at bottom.
----
Release 20100203
This file is pretty much all the documentation.
Added static strings to calculating and test methods.
----
Release 20100130
This file is pretty much all the documentation.
Added JUnit test cases, moved some files to a new package, reconfigured
packages and updated source code due to JUnit test case error catching.
-----
Release 20100128
This file is pretty much all the documentation.