eiffel-mas-tips Mailing List for Market Analysis System
Brought to you by:
jcochrane
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(13) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: dwoodyard <dwo...@rd...> - 2006-01-17 15:58:31
|
I downloaded mas_linux1.6.6q.tar.gz from sourceforge. I have the server working but when I try to start the GUI it says that MA_CLient can not be found. I looked in the classes dir and CL_Client and mascharts.jar were the only files in the directory. I have searched the web for an answer without any luck. Did I miss a step when I installed the package? Any help will be greatly appreciated, David |
From: Jim C. <jt...@di...> - 2004-09-27 22:12:15
|
> I installed mas-1.6.6q-1.i386.rpm and mas_v1.6.6t3 and tried to run > $ mas -o -f , -w -b 13579 & > and then > $ magc 13579 & I'm pretty busy lately, so this will not be a detailed response, but I believe you've missed the fact that there is now a jar file (called mascharts.jar if I remember correctly) in which all the java class files reside. You'll need to make the appropriate adjustments (e.g., modifying script files) to accomodate that. For example, java -cp ./mascharts.jar .... run in the directory where mascharts.jar lives should start the gui. I've responded re. this issue one or two times before. Hopefully one of those responses was posted to the mas-discuss list. Try a search on the sf lists page to see if you can find it - I probably included a little more detail there. (BTW, "jar vft mascharts.jar" will list the contents of mascharts.jar) [I can provide paid support if you need further help with this; but you might try asking here again first in case someone else is able to help; And for java-related questions, comp.lang.java.help is probably a good place to start.] Good luck! Jim > > but there were some files missing (e.g. MA_Client.class). I got these > files from mas_linux1.6.5.tar.gz (and mas-1.6.6g.tar.gz I think), but > now I've runned in to a dead end. I can't find FileReaderUtilities > $1.class anywhere (I've got FileReaderUtilities.class). > > The error-message looks like this: > $ magc 13579 & > [2] 5222 > $ Exception in thread "main" java.lang.NoClassDefFoundError: while > resolving class: support.FileReaderUtilities > at java.lang.VMClassLoader.resolveClass(java.lang.Class) > (/usr/lib/libgcj.so.5.0.0) > at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.5.0.0) > at support.Configuration.load_settings(java.lang.String) (Unknown > Source) > at support.Configuration.Configuration() (Unknown Source) > at support.Configuration.instance() (Unknown Source) > at mas_gui.Connection.login() (Unknown Source) > at mas_gui.DataSetBuilder.initialize() (Unknown Source) > at mas_gui.DataSetBuilder.DataSetBuilder(java.lang.String[]) (Unknown > Source) at MA_Client.main(java.lang.String[]) (Unknown Source) > Caused by: java.lang.ClassNotFoundException: support.FileReaderUtilities > $1 not found in [file:/opt/mas/bin/../lib/classes/, > file:/usr/share/java/libgcj-3.4.0.jar, file:./, core:/] > at java.net.URLClassLoader.findClass(java.lang.String) > (/usr/lib/libgcj.so.5.0.0) > at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) > (/usr/lib/libgcj.so.5.0.0) > at java.lang.ClassLoader.loadClass(java.lang.String, boolean) > (/usr/lib/libgcj.so.5.0.0) > at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) > (/usr/lib/libgcj.so.5.0.0) > at java.lang.Class.forName(java.lang.String, boolean, > java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0) > at _Jv_BytecodeVerifier.verify_instructions_0() > (/usr/lib/libgcj.so.5.0.0) > at _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.5.0.0) > at _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.5.0.0) > at _Jv_WaitForState(java.lang.Class, int) (/usr/lib/libgcj.so.5.0.0) > at java.lang.VMClassLoader.linkClass0(java.lang.Class) > (/usr/lib/libgcj.so.5.0.0) > at java.lang.VMClassLoader.resolveClass(java.lang.Class) > (/usr/lib/libgcj.so.5.0.0) > ...8 more > > > I hope someone can help > > Best regards > Lasse > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Eiffel-mas-discuss mailing list > Eif...@li... > https://lists.sourceforge.net/lists/listinfo/eiffel-mas-discuss |
From: Jim C. <jt...@di...> - 2004-05-10 10:00:02
|
I may have mentioned this before in this forum, I can't remember for sure, but it seems that a lot of mas users are not aware of this issue and I think posting it here will be helpful, since following this tip could help save people some time and irritation. The issue is that sometimes a new version of the mas executable will not be compatible with respect to the saved indicators and market analyzers (the indicators_persist and generators_persist files). However, preventative action can be taken to avoid running into this problem. It's described in the FAQ entry copied below. (The FAQ is at: http://eiffel-mas.sourceforge.net/support/FAQ.html .) I recommend that everyone who creates their own indicators or market analyzers get used to using this technique for creating and editing indicators and analyzers, so that you can avoid compatibility issues in the future. Here is the FAQ entry: I updated to a new version of MAS and when the server starts up it prints the following error and exits: "Retrieval of indicator library file indicators_persist failed. The file may be corrupted or you may have an incompatible version." How can I use the old indicators I have created with the new server? This problem occurs when a new version of MAS incorporates a change to the structure of the indicator code that is not compatible with the old version. As a result, the old indicator file, indicators_persist, cannot be loaded when the new version of the server starts up. Once this occurs, the only way to use your old indicators is to keep using the old version of the server. (This problem can also occur with market analyzers and the generators_persist file.) However, there is a preventative method that can be used to overcome the problem: Whenever you create a new indicator, start the server in the background (-b option) and use the command-line client program, macl, to talk to the server and "record" the conversation with the command: macl -r output_file <portnumber> where output_file is the name of the file to which you wish to save the recorded output and <portnumber> is the port number with which you started the server. Keep this file in a safe place. It would probably also be a good idea to keep it backed up. Whenever you upgrade to a new version of MAS and get the above error message, you can restore the indicators you have created by running the following command on each of your recorded output files: macl -i file <portnumber> where file is the name of a file created earlier with the -r option and <portnumber> is, again, the port number with which you started the server. This solution works for both indicators and market analyzers. Note for Windows users: Starting MAS the "normal" way, by clicking on the MAS icon, will execute the necessary step described above of starting the server in the background. However, you will still need to run the 'macl -r ...' and 'macl -i ...' commands described above from the Windows command line. Those who do not know how to do this may want to wait for a future release in which this procedure is handled automatically. |
From: Jim C. <jt...@di...> - 2003-09-23 02:17:39
|
Hi AAACPA. (I'm also sending this to the discuss and tips list because it contains info. that could be useful to other mas users.) > Thanks for your help to date. I have Java up and working. I can = > produce charts. I'm glad you got the charts working. > I want to be able to perform market analyses on a large number = > of > stocks at one time. It appears that the stocks I can see are limited by = > the "Symbols" file furnished.. Yes - When you use the option to get data from the web, the symbols file is used to tell mas what stocks to get data for. You can edit this file and add as many symbols as you want, of course. > > I can see the GUI files but cannot seem to find any "canned searches". = > Are there any and how do I invoke them? You have explained how to prepare a > couple but I do not see how to steal the completed product(s). OK - I need some help on your terminology here - What do you mean by canned searches? Are you talking about searching for a stock symbol, or about finding a pre-existing set of market analysis criteria, or something else? What are you searching for? > > I would like to expand the files searched as well as the potential = > charts to include at least the S & P 500. Is there any way to copy a list of = > these stocks into the symbols file without screwing things up? Yes - you can simply edit the symbols file to contain the list of symbols you want. Just make sure that there is only one symbol per line. (Don't use Word - Use a text editor, such as notepad.) > > Is there a quick and dirty way for a novice, like me, to create a search > from one or more of several canned searches. For example I want to see = > a list of all stocks which experienced an MACD breakout today and a = > stochastic break out within the 3 previous days. It would seem that this might be = > done with a simple Q & A file which would create a search script which could = > be activated by the user. Although mas is powerful, it's user interface is rather hard to use. In this case, you need to use the macl, a command-line interface to mas, to create the criteria you want and tell mas to send the signals as email or to a file. The documentation describes how to do this - It's not easy as pie, but if you have time and patience, it may not be too hard to figure out. (This list is partly for people to help each other with such things. If you try it and have problems, others on the list may be able to help, if you describe the problem clearly. Alternatively, I can probably help you set up some criteria for a fee - Don't have the time to do it for free.) The UI needs to be improved to make such tasks much easier. I'm hoping to release such an improved version, although it will not be free. Such improvements take time and hard work and I can't afford to donate all of my development time at this point. > > Can the various furnished files and scripts be edited thru Notepad? = > What precautions should be taken to avoid introducing unwanted garbage? Most of them can be edited. Re. precautions, generally, if you are careful to follow the format of the existing file contents and, where they appear, use the comments as a guide; and if you avoid editing files where everything occurs on just one line (i.e., the file has only one line), you will probably be OK - Back the originals up in case you make a mistake. (The one-line files are in UNIX format, which uses a different line-terminator than Windows. It is possible to edit them cleanly - See the FAQ for more info. on this: Search for "unix text format" at: http://eiffel-mas.sourceforge.net/support/FAQ.html . I think there may be only one one-line file: .ma_clientrc) > > Can the chart program be revised to show an up or down arrow in the = > event of, for instance, an MACD and stochastic breakout? Pedro Pla and I are working on this. However, it may or may not be available in the free version of MAS. > Is there any way to display 2 technical analyses in one chart (for instance MACD & = > Stochastic). Yes: Simply do this: Under the "Veiw" menu, make sure "Replace indicators" is off. Then just keep selecting indicators - Each one you select will be added to the chart. > It appears that I can have a moving average in the basic chart together = > with > one technical analysis below. Nope - you can have as many indicators as you want. Perhaps you have Replace indicators set to on. Once you get this working, you can do: View -> Indicator Colors to see the color of each indicator to help you tell which is which. > > Congratulations on your program(s). It appears to me that MAS may be a > program capable of performing the majority of the research which an = > informed > investor requires. I presume that this is where you are headed. Yes. MAS is very powerful - It can already do a lot. But, as I mentioned and as I'm sure you've noticed, it's power is difficult to harness at this point. It needs an improved UI to make this power more accessible. Jim |
From: Jim C. <jt...@di...> - 2003-09-12 07:23:40
|
> Thanks to Jim for the answer about adjusting the names > of market analysers. Today's issue is, i hope, not related > to that, as i have not yet tried those tweaks. > > I run my market analysis as per normal, but mas server > now gives this error message to stdout ... > ------ > Failed to lock event history file > /home/crossley/mas/lib/crossley@localhost.history1808642937 > - results will not be saved. > ------ > > I tried removing that file, which was being happily used > on previous runs .... same error. > > I tried removing that registrant completely and adding it > back again ... same error. > > Obviously, now when i run my analysis i get the same events > delivered again. Yes, as you mentioned in your later email, mas creates a lock file to lock the *.history... file, based on its file name, but starting with a '.'. The lock file may not be removed if, for example, the server dies unexpectedly while processing, so it needs to be removed by hand. And as you mentioned, the lock file can be seen with an "ls -la" in the directory where the *.history* file resides. Thanks for pointing this out. Jim |
From: Jim C. <jt...@di...> - 2003-09-12 07:14:05
|
> Oh i see now. That is a scripting facility for macl - great. > > The procedure that you described did not work at first, > but i figured it out and learnt a lot about MAS in the process. > > I am using your pre-release mas-1.6.5g so maybe that is why. > The script for "volume spike analyzer" needed some tweaks. > It needed an "m" at the beginning, so the first lines are: That's right - I had forgotten the 'm'. It's also needed for 1.6.5 and earlier. > m > c > s > o > ... > and the line "CONSTANT" needed to change to "NUMERIC_VALUE_COMMAND" > as you had described to the list in another mail. These name changes are new - after 1.6.5. > > It works. Thanks. > --David Thanks for catching it and posting to the list. Jim |
From: Jim C. <jt...@di...> - 2003-09-10 04:16:41
|
> I would like to edit the name of some market analysers that are > already set. Out-of-the box MAS comes with 15 analysers listed > with the "m=>v" option of macl. I do not want to have to remove > them just to add them again with different names. > > For example, i want to change > Volume > Yesterday's Volume EMA (5) * 3.5 > to > Volume > Yesterday's Volume EMA5 * 3.5 (volume spike up) > so as to be consistent with the format of the other analyser names. > > I found some files in /opt/mas/lib/config/ which looked like > the way to go. However, this does not seem to have any effect. > > Is there such a simple way? > > --David Hi David. The market analyzers (along with the indicators) are stored in a binary data file (called generators_persist), so the name of an analyzer cannot be easily changed by editing a file. Unfortunately, I have not yet added a feature to allow changing analyzer or indicator names from the mas command-line, which is where this capability probably should reside. Until this feature is available, I think the best solution is to delete the analyzer and, instead of recreating it by hand, copy its definition from lib/config/market_analyzers to a new file. In this case, search the lib/config/market_analyzers file for the comment line: # volume spike analyzer and copy from there to the end of that analyzer specification (just before the comment announcing the next analyzer). You will get: # volume spike analyzer c s o Market Data y GT_OPERATOR c VOLUME c MULTIPLICATION c FUNCTION_BASED_COMMAND c EMA of Volume y SETTABLE_OFFSET_COMMAND c BASIC_NUMERIC_COMMAND c 1 CONSTANT c 3.5 daily o # Name Volume > Yesterday's Volume EMA (5) * 3.5 s Put these lines into a file and append two lines to it: - x These two lines will cause the mas shell to go back to the main menu and then exit. Then edit the file to plug in the name you want and then use the macl -i <file> <portnumber> format of the macl program (after starting the server with port <portnumber>, of course) to input the commands from this new file into the mas server to recreate the analyzer with the new name. Let me know if you have any problems or questions. Jim |
From: Jim C. <jt...@di...> - 2003-08-25 04:09:03
|
> Hello, > > I'm new to MAS.. I tried adding the Force Index to > MAS. It worked in the command prompt and is showing in > the list of indicators. But when I try to load the > Java Charts the new Force Index is not there in the > list of indicators. I'm running version 1.6.5a in > Windows XP. I followed the instructions in the > creating_indicators.txt file. Do I need to do > something extra for the new indicator to show up in > the java charts? Hi Henry. Apologies for the late response. Yes, there is one more step you need to get the new indicator to show up in the charting GUI. You need to edit the .ma_clientrc file and add a line in that file for the new indicator. This file resides in the lib/classes directory, under the main MAS directory - the directory in which you installed MAS. This is not very user friendly and the GUI will probably be enhanced in the future with a feature to make the task of adding a new indicator much easier. But for now it must be done by hand. To add the new indicator, you need to find a 3-line comment in the .ma_clientrc file that begins: # Specify which indicators to include in the selection list, the order ... After the comment are specifications for indicators that the GUI will request from the server. The easiest way to add a line for your new indicator is to copy an existing line and change it to fit your new indicator. For example, for your Force Index indicator, assuming you want it to appear in the lower chart rather than the main chart, you could change the line: lower_indicator MACD Difference red to: lower_indicator Force Index red If you want the indicator to be drawn in a color other than red, pick one of the colors listed in the comment lines that begin: # color settings - Valid colors are: and change the string "red" to the string for the color you picked. There are two things to note here: First, the format of an indicator specification line is: <indicator-location>{tab}<indicator-name>{tab}<indicator-color> where: <indicator-location> is either lower_indicator or upper_indicator {tab} is a tab character <indicator-name> is the name of the indicator <indicator-color> is the color of the indicator The second thing is that the indicator name has to match exactly the name you gave the indicator when you created it with the mas program. One more obstacle you may encounter is that the file is in UNIX text format, which means that many windows-based editors (since they require both a newline and linefeed character to indicate a new line) will display the file as one long line. It will be very difficult to edit the file with such an editor. To solve this problem, you can obtain an editor that recognizes UNIX format. (I haven't researched it, but I would guess that there are several such editors available for free on the web. Vim, a VI clone [http://www.vim.org/index_real.php], is one, and, most likely, a windows version of emacs exists that can also do this. A quick search on google.com unearthed this site, which lists several windows editors: http://www.hsinlin.com/software/text_editors.html One of the links on that site leads to: http://www.newbie.net/NotesPad/notespad_32.html a free windows editor that appears to handle UNIX text files.) I'm aware that dealing with this obstacle will be a major inconvenience for some people. This is one reason I'm hoping to be able to add a feature to the GUI to make it easy to add a new indicator. Please let me know if you have any further questions and, also, let me know if you are able to get the new indicator working in the GUI. Jim |
From: Jim C. <jt...@di...> - 2003-06-11 04:35:11
|
Hi Oscar. > Hi, > > I have recently installed and tested MAS on Linux RedHat 7.3 > using flat text files as DB. > > I wish to switch to using MySQL as DB. So far I have a working > MySQL and unixODBC. I am setting up the DB for MAS and > from the sysadmin docs it is mentioned that there are Postgress > scripts for doing so. However, I have looked and looked in the > files but have not found them.=20 > > Is there any chance that I can have a copy of these scripts ? Yes. Several people have asked me this question. When I read your email, I realized it was time for me to put it in the FAQ. Here's the answer, copied from the FAQ (http://eiffel-mas.sourceforge.net/support/FAQ.html#database): The example script files for creating MAS tables reside in a file separate from the main MAS installation file. You will find them in the scripts archive file in the download section - either scripts{relnum}.tar.gz or scripts{relnum}.zip -, where {relnum} stands for the release number - e.g., 1.6.5. (The scripts files for the latest release, 1.6.5 - as of June 2003 - are scripts1.6.5.tar.gz and scripts1.6.5.zip.) Several people have asked me this question, so I've concluded that I need to include the database scripts with the main installation file. I will probably do this for the next official (non-beta) release. [The download URL is: http://sourceforge.net/project/showfiles.php?group_id=6838] > When I have successfully completed this exercise is it worth > that I write a how-to for MySQL and post at subsciption list ? Definitely! This would be much appreciated - not only by me, but, I'm sure, by future MAS users who want to do the same thing. (I'm also sending this response to the tips and discuss lists.) > > Thanks in advance. > > Oscar Plameras You're quite welcome. Jim Cochrane |
From: Jim C. <jt...@di...> - 2003-06-02 19:16:58
|
Paul - I couldn't resist trying out making an analyzer with the indicator we created yesterday, along with a couple alternatives. (I'm also sending this to the tips list in case others find it useful.) I've included the macl scripts for the indicators and analyzers I tried, below. The first script uses two indicators: the indicator we created yesterday and a line. It simply gives a signal if the "test1" (as I named it) indicator crosses over the line. (So it is detecting when the indicator goes from 0 to 1, rather than whenever its value is 1, as we were thinking of yesterday.) The 2nd script tries a different approach, using slope to detect the same change. (Hopefully the comments in the script are self-expalanatory.) The 3rd script is the indicator we created yesterday, which I'm including for completeness. If you try out the 1st and 2nd scripts, you'll notice that, although many signals are the same, some differ by a day and some (from script 1, I believe) are generated that don't exist in the other. This is because the slope analyzer used for the 2nd script approximates the slope by using 3 data points: last period's, the current period's, and the next period's (e.g., yesterday, today, and tomorrow). It does this so that it is not late in detecting -/+ and +/- slope changes. (I think, in general, not being late is a good thing for trading.) So sometimes its signals are earlier than those of the other analyzer. And sometimes the signals are just different - because of the approximation. You may find using slope detection like this is what you want for many of your analyzers. (There are more analyzers that use slope in the "market_analyzers" macl script file that comes with the mas release, if you want to study them a bit to learn more about how to use the slope.) I hope you find this helpful. Jim ----------------------------------------------------------------------------- # macl script that defines a market analyzer that detects when a "test1" # indicator (which is 1 if macd-hist[today] > macd-hist[yesterday] and 0 # otherwise) changes from 0 to 1. It does this by detecting if test1 # crosses over a horizontal line whose y value is 0.5, which is in between 0 # and 1. m c s t test1 y Line y 0.5 0 daily below-to-above n b test1: 0 -> 1 s - x ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- # macl script that defines a "Slope of MACD Histogram" indicator and a # "Slope of macd hist crossed above 0" market analyzer that uses the # "Slope of MACD Histogram" indicator. The market analyzer does its # job by detects if slope of macd hist. crosses over horizontal line # whose y value is 0. e c n ONE_VARIABLE_FUNCTION c Slope of MACD Histogram 2 MACD Histogram y SLOPE_ANALYZER c MACD Histogram y s - m c s t Slope of MACD Histogram y Line y 0 0 daily below-to-above n b test2: Slope of macd hist crossed above 0 s - x ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- # An indicator that is 1 if macd-hist[today] > macd-hist[yesterday] and 0 # otherwise e c n ONE_VARIABLE_FUNCTION c test1 MACD Histogram y NUMERIC_CONDITIONAL_COMMAND c GT_OPERATOR c BASIC_NUMERIC_COMMAND c SETTABLE_OFFSET_COMMAND c BASIC_NUMERIC_COMMAND c MACD Histogram y 1 NUMERIC_VALUE_COMMAND c 1 NUMERIC_VALUE_COMMAND c 0 s - x ----------------------------------------------------------------------------- |
From: Jim C. <jt...@di...> - 2003-05-26 19:42:26
|
> Jim, > > Having studied the doc "Creating Market Analysers ....." I have run into > a brick wall !! Hi Paul. > > Using your diagram convention what I want to do is:- > > > GT_OPERATOR > / \ > / \ > Relative Strength Constant > Index I believe what you want is the basic linear command, which extracts the current value from the input function being analyzed (which in your case is the RSI function). So your diagram would change to (where BLC is the basic linear command): GT_OPERATOR / \ / \ BLC Constant Note: In the latest version of mas, Constant has been renamed as Numeric-value-command. (Since it can function as either a constant or as a variable whose value can change during run.) Let me know if this works for you. Jim > > What happens here is I select > > > Select action: > Create a new market analyzer (c) Remove a market analyzer (r) > View a market analyzer (v) Edit market analyzers (e) > Previous (-) c > > > Select analyzer type: Simple (s) Compound (c) s > Would you like this analyzer to use one or two technical indicators? > One (o) Two (t) o > Select the technical indicator > 1) Simple Moving Average > 2) Exponential Moving Average > 3) MACD Difference > 4) MACD Signal Line (EMA of MACD Difference) > 5) MACD Histogram > 6) Momentum > 7) Rate of Change > 8) Williams %R > 9) Stochastic %K > 10) Stochastic %D > 11) Slow Stochastic %D > 12) Relative Strength Index > 13) Wilder Moving Average > 14) Weighted Moving Average > 15) Market Data > 16) Line > 17) On Balance Volume > 18) Accumulation/Distribution > 19) Slope of MACD Signal Line > 20) Slope of Slope of MACD Signal Line > 21) Force Index > 22) EMA of Volume > 23) EMA of Open interest > 24) Slope of EMA of Volume > 25) Slope of EMA of Open interest > 26) Slope of MACD Signal Line Less Than or Equal to -0.175 > 27) Slope of MACD Signal Line Greater Than or Equal to 0.175 > 28) Slope of MACD Signal Line Trend > 29) Volume > 30) MACD of Volume > 31) Midpoint > 32) WMA of Midpoint > 12 > Select Relative Strength Index? (y/n) y > Select an object for the root operator: > [List of all valid objects:] > 1) LE_OPERATOR > 2) GE_OPERATOR > 3) EQ_OPERATOR > 4) LT_OPERATOR > 5) GT_OPERATOR > 6) XOR_OPERATOR > 7) OR_OPERATOR > 8) IMPLICATION_OPERATOR > 9) EQUIVALENCE_OPERATOR > 10) AND_OPERATOR > 11) NOT_OPERATOR > 12) TRUE_COMMAND > 13) FALSE_COMMAND > 14) SIGN_ANALYZER > 5 > Select: > Print description of GT_OPERATOR? (d) > Choose GT_OPERATOR (c) Make another choice (a) c > Select an object for the GT_OPERATOR's left operand: > [List of all valid objects:] > 1) SUBTRACTION > 2) MULTIPLICATION > 3) DIVISION > 4) SAFE_DIVISION > 5) ADDITION > 6) POWER > 7) N_TH_ROOT > 8) SETTABLE_OFFSET_COMMAND > 9) CONSTANT > 10) BASIC_NUMERIC_COMMAND > 11) VOLUME > 12) LOW_PRICE > 13) HIGH_PRICE > 14) CLOSING_PRICE > 15) OPENING_PRICE > 16) OPEN_INTEREST > 17) BASIC_LINEAR_COMMAND > 18) BOOLEAN_NUMERIC_CLIENT > 19) SLOPE_ANALYZER > 20) UNARY_LINEAR_OPERATOR > 21) ABSOLUTE_VALUE > 22) ROUNDED_VALUE > 23) SQUARE_ROOT > 24) LOG > 25) LOG2 > 26) LOG10 > 27) FUNCTION_BASED_COMMAND > 28) INDEX_EXTRACTOR > > > The question is - "How do I get RSI as the left Operand ?????" > > I have played with most of the really obvious and not so obvious > selections and have drawn a blank !! > > I would really like a push over this little hurdle - PLEASE ??? > > Regards, > > > > > > > > > > |
From: Jim C. <jt...@di...> - 2003-05-26 18:37:53
|
> Jim, > > Having studied the doc "Creating Market Analysers ....." I have run into > a brick wall !! Hi Paul. > > Using your diagram convention what I want to do is:- > > > GT_OPERATOR > / \ > / \ > Relative Strength Constant > Index I believe what you want is the basic linear command, which extracts the current value from the input function being analyzed (which in your case is the RSI function). So your diagram would change to (where BLC is the basic linear command): GT_OPERATOR / \ / \ BLC Constant Note: In the latest version of mas, Constant has been renamed as Numeric-value-command. (Since it can function as either a constant or as a variable whose value can change during run.) Let me know if this works for you. Jim > > What happens here is I select > > > Select action: > Create a new market analyzer (c) Remove a market analyzer (r) > View a market analyzer (v) Edit market analyzers (e) > Previous (-) c > > > Select analyzer type: Simple (s) Compound (c) s > Would you like this analyzer to use one or two technical indicators? > One (o) Two (t) o > Select the technical indicator > 1) Simple Moving Average > 2) Exponential Moving Average > 3) MACD Difference > 4) MACD Signal Line (EMA of MACD Difference) > 5) MACD Histogram > 6) Momentum > 7) Rate of Change > 8) Williams %R > 9) Stochastic %K > 10) Stochastic %D > 11) Slow Stochastic %D > 12) Relative Strength Index > 13) Wilder Moving Average > 14) Weighted Moving Average > 15) Market Data > 16) Line > 17) On Balance Volume > 18) Accumulation/Distribution > 19) Slope of MACD Signal Line > 20) Slope of Slope of MACD Signal Line > 21) Force Index > 22) EMA of Volume > 23) EMA of Open interest > 24) Slope of EMA of Volume > 25) Slope of EMA of Open interest > 26) Slope of MACD Signal Line Less Than or Equal to -0.175 > 27) Slope of MACD Signal Line Greater Than or Equal to 0.175 > 28) Slope of MACD Signal Line Trend > 29) Volume > 30) MACD of Volume > 31) Midpoint > 32) WMA of Midpoint > 12 > Select Relative Strength Index? (y/n) y > Select an object for the root operator: > [List of all valid objects:] > 1) LE_OPERATOR > 2) GE_OPERATOR > 3) EQ_OPERATOR > 4) LT_OPERATOR > 5) GT_OPERATOR > 6) XOR_OPERATOR > 7) OR_OPERATOR > 8) IMPLICATION_OPERATOR > 9) EQUIVALENCE_OPERATOR > 10) AND_OPERATOR > 11) NOT_OPERATOR > 12) TRUE_COMMAND > 13) FALSE_COMMAND > 14) SIGN_ANALYZER > 5 > Select: > Print description of GT_OPERATOR? (d) > Choose GT_OPERATOR (c) Make another choice (a) c > Select an object for the GT_OPERATOR's left operand: > [List of all valid objects:] > 1) SUBTRACTION > 2) MULTIPLICATION > 3) DIVISION > 4) SAFE_DIVISION > 5) ADDITION > 6) POWER > 7) N_TH_ROOT > 8) SETTABLE_OFFSET_COMMAND > 9) CONSTANT > 10) BASIC_NUMERIC_COMMAND > 11) VOLUME > 12) LOW_PRICE > 13) HIGH_PRICE > 14) CLOSING_PRICE > 15) OPENING_PRICE > 16) OPEN_INTEREST > 17) BASIC_LINEAR_COMMAND > 18) BOOLEAN_NUMERIC_CLIENT > 19) SLOPE_ANALYZER > 20) UNARY_LINEAR_OPERATOR > 21) ABSOLUTE_VALUE > 22) ROUNDED_VALUE > 23) SQUARE_ROOT > 24) LOG > 25) LOG2 > 26) LOG10 > 27) FUNCTION_BASED_COMMAND > 28) INDEX_EXTRACTOR > > > The question is - "How do I get RSI as the left Operand ?????" > > I have played with most of the really obvious and not so obvious > selections and have drawn a blank !! > > I would really like a push over this little hurdle - PLEASE ??? > > Regards, > > > > > > > > > > |
From: Jim C. <jt...@di...> - 2003-05-26 05:45:27
|
> This. I suppose, is mainly for Jim !! > > When building compound generators are the links to the lower level > generators static or dynamic. Eg if I build an RSI generator and use it > in a further generator do changes to the original RSI generator affect > the compound generator - is it statically or dynamically linked ???? Note - the example I gave in my previous email changed the compound generator with no change to the contained (or lower level) generators. Since the generators are not shared, of course, changing the lower level generators, as in your example, will also not affect the containing generators. Jim |
From: Jim C. <jt...@di...> - 2003-05-26 05:32:55
|
> This. I suppose, is mainly for Jim !! > > When building compound generators are the links to the lower level > generators static or dynamic. Eg if I build an RSI generator and use it > in a further generator do changes to the original RSI generator affect > the compound generator - is it statically or dynamically linked ???? Paul, to use your words, it is dynamic. I just tried it out to verify that I was remembering correctly - I changed the "MACD Crossover and Stochastic %D Crossover (Buy)", a compound indicator that uses "MACD Crossover (Buy)" and "Stochastic %D Crossover (Buy)": I changed the parameters of its MACD and its stochastic and saved them. Then I used the "market analyzer" editing function to view the parameters for the "MACD Crossover (Buy)" and "Stochastic %D Crossover (Buy)" generators and the values had not changed. So the "sub"-generators are not shared. (If anyone's wondering, market analyzer and generator [short for event generator] mean the same thing.) Jim |
From: Jim C. <jt...@di...> - 2003-05-26 05:07:34
|
Hi Paul. > Jim, > > I'm hoping you may be able to point me in the right direction. What I am > trying to build is an indicator ( I think its an indicator rather than > an analyser/generator ). The spec is:- > > Objective - to detect the point at which the MACD Histogram changes > direction. > > The direction of the histogram for the 3 prior days must be the same ( > in other words it slopes up/down then changes direction ). > > The intention is then to build a generator which tests the point at > which the change of direction occurs ( ie against a signal line of zero > slope ). > > I seem to have the change of direction sorted - but I am having trouble > understanding the way in which to build the 3 day test. You're using a slope analyzer for the change of direction, right? For the 3-day test, for such criteria I've found it helps to put it into algorithmic form (e.g, if slopesign (f)[now] = slopesign(f)[now-1] = slopesign(f)[now-2] then ..., or something like that), then translate the algorithm into a mas indicator/command structure. Sorry I don't have time to ponder what the exact structure would be, but I think because of the 3-day check you'll want an n-record-one-variable-function with n=3 that takes the macd hist. as input. And for the if slope... algorithm itself, I think you'll want to use the "boolean-numeric-client" command (which has been renamed in the current version as numeric-conditional-command, since it can be used for if/else logic). Once you figure out what to use for its "boolean operator" (the 3-day test), you can do something like: for its true command use a constant with value 1, for the false cmd, constant with value 0. (constant has been renamed numeric-value-command in the current version.) So if the result is 1, your condition holds; combine that with the slope change criteria with the and-operator and I think you'll have what you want. (I've also found that it helps to draw the command/operator tree you will use before using mas to create the indicator - you sort of have to turn yourself into a lisp machine :-).) (I think you can do what you want with 1.6.5, but you may want to upgrade, if you haven't already, to what I just put up on sourceforge (1.6.6g), since a couple powerful operator/commands have been added. This allowed me to implement parabolic SAR, which I don't believe was possible before. I'll include the "macl script" for parabolic SAR, since it may give you some good clues on how to use the numeric-conditional-command (with apologies for the difficult to parse "script syntax").) Hope this helps. Jim > > Hope this is within bounds of the discussion group - if not tell me - I > have a thick skin !! > > Regards, > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your application fit in a > relational database is painful, don't do it! Check out ObjectStore. > Now part of Progress Software. http://www.objectstore.net/sourceforge > _______________________________________________ > Eiffel-mas-discuss mailing list > Eif...@li... > https://lists.sourceforge.net/lists/listinfo/eiffel-mas-discuss Here's the parabolic SAR script. # This macl -i script implements the Parabolic SAR formula. The formula # is fairly complex and requires the new NUMERIC_VALUED_COMMAND_WRAPPER # and COMMAND_SEQUENCE operators. Below, in comments, is a perl script # that implements the formula, which I used to test that I had gotten it # right and as a model for implementing the formula in MAS. ##!/usr/bin/perl -wn # #BEGIN { # $long = 1; # $short = 2; # $prev_sar = 0; # $prev_af = 0; # $prev_ep = 0; # $af_max = .1999; # $af_increment = .02; # $trade_state = $long; # $initial_af_value = .2; # $af = $initial_af_value; # $sar = 0; # $ep = 0; # $line_count = 0; # $succeeded = 1; #} # #END { # if ($succeeded) { # print "SUCCEEDED\n"; # } else { # print "FAILED\n"; # } #} # #if (/^#/) { next; } #@a = split; #$date = $a[0]; #$high = $a[1]; #$low = $a[2]; #++$line_count; # #if ($line_count == 1) { # init(); # $prev_sar = $sar; # $prev_af = $af; # $prev_ep = $ep; # next; #} # #execute(); #report(); #$prev_sar = $sar; #$prev_af = $af; #$prev_ep = $ep; # #sub sar_calculation { # return ($prev_ep - $prev_sar) * $prev_af + $prev_sar; #} # #sub init { # $sar = $low; # $ep = $high; #} # #sub execute { # if ($trade_state == $long) { # # long block # if (change_direction ($trade_state)) { # switch_to_short(); # $trade_state = $short; # } else { # # remain long # $sar = sar_calculation(); # if ($high > $prev_ep) { # if ($af < $af_max) { # $af = $af + $af_increment; # } # $ep = $high; # } # } # } else { # # short block # # check $trade_state == $short end # if (change_direction ($trade_state)) { # switch_to_long(); # $trade_state = $long; # } else { # # remain short # $sar = sar_calculation(); # if ($low < $prev_ep) { # if ($af < $af_max) { # $af = $af + $af_increment; # } # $ep = $low; # } # } # } #} # #sub change_direction { # my ($state) = @_; # my $Result = 0; # if ($state == $long) { # # Change from long to short? # $Result = $low < $prev_sar; # } else { # # Change from short to long? # die if $state != $short; # $Result = $high > $prev_sar; # } # return $Result; #} # #sub switch_to_short { # $sar = $prev_ep; # $af = $af_increment; # $ep = $low; # print "[S] " #} # #sub switch_to_long { # $sar = $prev_ep; # $af = $af_increment; # $ep = $high; # print "[L] " #} # #sub report { # print "($date) "; # print "af: $af "; # print "ep: $ep "; # printf ("sar:%.4f ", $sar); # $ref_af = $a[3]; # $ref_ep = $a[4]; # $ref_sar = $a[5]; # print "(refs: $ref_af $ref_ep $ref_sar) "; # if (! req($af, $ref_af)) { # print "[af differs]"; # $succeeded = 0; # } # if (! req($ep, $ref_ep)) { # print "[ep differs]"; # $succeeded = 0; # } # if (! req($sar, $ref_sar)) { # print "[sar differs]"; # $succeeded = 0; # } # print "\n"; #} # #sub req { # my ($r1, $r2) = @_; # return abs ($r1 - $r2) < .0001; #} e c n ONE_VARIABLE_FUNCTION c Parabolic SAR No Input Function y NUMERIC_VALUED_COMMAND_WRAPPER e Root # This is the top-level command sequence, which includes an initialization # section, run only for the first period, a main body, three assignments to # update the previous AF, EP, and SAR, and the SAR value by itself to # provide the result of the calculation. COMMAND_SEQUENCE e Main sequence y NUMERIC_CONDITIONAL_COMMAND e If 1st period, Init; else main body EQ_OPERATOR e First period? UNARY_LINEAR_OPERATOR e Period number No Input Function y INDEX_EXTRACTOR c shared UNARY_LINEAR_OPERATOR (Period number) c NUMERIC_VALUE_COMMAND e One n 1 NUMERIC_VALUED_COMMAND_WRAPPER e Initialization # The Initialization sequence - only executed for the first period, # consisting of "variable" and "constant" initializations COMMAND_SEQUENCE e Initialization sequence y NUMERIC_VALUE_COMMAND e Previous SAR value n 0 n y NUMERIC_VALUE_COMMAND e Previous EP value n 0 n y NUMERIC_VALUE_COMMAND e Previous AF value n 0 n y NUMERIC_VALUE_COMMAND e short n -1 n y NUMERIC_VALUE_COMMAND e AF increment y .02 n y NUMERIC_VALUE_COMMAND e Maximum AF value y .1999 n y NUMERIC_VALUE_COMMAND e Null operation n 0 n y NUMERIC_ASSIGNMENT_COMMAND e tradestate := long NUMERIC_VALUE_COMMAND e tradestate n 0 NUMERIC_VALUE_COMMAND e long n 1 n y NUMERIC_ASSIGNMENT_COMMAND e SAR := low NUMERIC_VALUE_COMMAND e SAR n 0 LOW_PRICE c n y NUMERIC_ASSIGNMENT_COMMAND e EP := high NUMERIC_VALUE_COMMAND e EP n 0 HIGH_PRICE c n y NUMERIC_ASSIGNMENT_COMMAND e AF := Initial AF value NUMERIC_VALUE_COMMAND e AF n 0 NUMERIC_VALUE_COMMAND e Initial AF value y .2 n n # The main body, executed on periods 2 to the end of the data - Corresponds # to the 'execute' routine in the perl script. NUMERIC_CONDITIONAL_COMMAND e Main body EQ_OPERATOR e tradestate = long? shared NUMERIC_VALUE_COMMAND ({tradestate}) c shared NUMERIC_VALUE_COMMAND ({long}) c # Corresponds to the "long block" in the perl script. NUMERIC_CONDITIONAL_COMMAND e Long block OR_OPERATOR e Change direction? AND_OPERATOR c shared EQ_OPERATOR (tradestate = long?) c LT_OPERATOR c shared LOW_PRICE c shared NUMERIC_VALUE_COMMAND ({Previous SAR value}) c AND_OPERATOR c EQ_OPERATOR e tradestate = short? shared NUMERIC_VALUE_COMMAND ({tradestate}) c shared NUMERIC_VALUE_COMMAND ({short}) c GT_OPERATOR c shared HIGH_PRICE c shared NUMERIC_VALUE_COMMAND ({Previous SAR value}) c NUMERIC_VALUED_COMMAND_WRAPPER e Switch to short # This section orresponds to the 'switch_to_short' routine in the perl # script - executed when 'long' and 'Change direction?' is true. COMMAND_SEQUENCE e "Switch to short" sequence y NUMERIC_ASSIGNMENT_COMMAND e SAR := Previous EP value shared NUMERIC_VALUE_COMMAND ({SAR}) c shared NUMERIC_VALUE_COMMAND ({Previous EP value}) c n y NUMERIC_ASSIGNMENT_COMMAND e AF := AF increment shared NUMERIC_VALUE_COMMAND ({AF}) c shared NUMERIC_VALUE_COMMAND ({AF increment}) c n y NUMERIC_ASSIGNMENT_COMMAND e EP := low shared NUMERIC_VALUE_COMMAND ({EP}) c shared LOW_PRICE c n y NUMERIC_ASSIGNMENT_COMMAND e tradestate := short shared NUMERIC_VALUE_COMMAND ({tradestate}) c shared NUMERIC_VALUE_COMMAND ({short}) c n n NUMERIC_VALUED_COMMAND_WRAPPER e Remain long # This section corresponds to the "remain long" block in the perl script. # It updates SAR and, conditionally, updates AF and EP. COMMAND_SEQUENCE e "Remain long" sequence y NUMERIC_ASSIGNMENT_COMMAND e Update SAR shared NUMERIC_VALUE_COMMAND ({SAR}) c ADDITION e SAR calculation MULTIPLICATION c SUBTRACTION c shared NUMERIC_VALUE_COMMAND ({Previous EP value}) c shared NUMERIC_VALUE_COMMAND ({Previous SAR value}) c shared NUMERIC_VALUE_COMMAND ({Previous AF value}) c shared NUMERIC_VALUE_COMMAND ({Previous SAR value}) c n y NUMERIC_CONDITIONAL_COMMAND c GT_OPERATOR e High > Previous EP? shared HIGH_PRICE c shared NUMERIC_VALUE_COMMAND ({Previous EP value}) c NUMERIC_VALUED_COMMAND_WRAPPER c COMMAND_SEQUENCE c y NUMERIC_CONDITIONAL_COMMAND e AF increment condition LT_OPERATOR e AF < Maximum AF value? shared NUMERIC_VALUE_COMMAND ({AF}) c shared NUMERIC_VALUE_COMMAND ({Maximum AF value}) c NUMERIC_ASSIGNMENT_COMMAND e Increment AF shared NUMERIC_VALUE_COMMAND ({AF}) c ADDITION e AF + AF increment shared NUMERIC_VALUE_COMMAND ({AF}) c shared NUMERIC_VALUE_COMMAND ({AF increment}) c shared NUMERIC_VALUE_COMMAND ({Null operation}) c n y shared NUMERIC_ASSIGNMENT_COMMAND (EP := high) c n n shared NUMERIC_VALUE_COMMAND ({Null operation}) c n n # Corresponds to the "short block" section of the perl script. NUMERIC_CONDITIONAL_COMMAND e Short block shared OR_OPERATOR (Change direction?) c NUMERIC_VALUED_COMMAND_WRAPPER e Switch to long # This section orresponds to the 'switch_to_long' routine in the perl # script - executed when 'short' and 'Change direction?' is true. COMMAND_SEQUENCE e "Switch to long" sequence y shared NUMERIC_ASSIGNMENT_COMMAND (SAR := Previous EP value) c n y shared NUMERIC_ASSIGNMENT_COMMAND (AF := AF increment) c n y shared NUMERIC_ASSIGNMENT_COMMAND (EP := high) c n y shared NUMERIC_ASSIGNMENT_COMMAND (tradestate := long) c n n NUMERIC_VALUED_COMMAND_WRAPPER e Remain short # This section corresponds to the "remain short" block in the perl script. # It updates SAR and, conditionally, updates AF and EP. COMMAND_SEQUENCE e "Remain short" sequence y shared NUMERIC_ASSIGNMENT_COMMAND (Update SAR) c n y NUMERIC_CONDITIONAL_COMMAND c LT_OPERATOR e Low < Previous EP? shared LOW_PRICE c shared NUMERIC_VALUE_COMMAND ({Previous EP value}) c NUMERIC_VALUED_COMMAND_WRAPPER c COMMAND_SEQUENCE c y shared NUMERIC_CONDITIONAL_COMMAND (AF increment condition) c n y shared NUMERIC_ASSIGNMENT_COMMAND (EP := low) c n n shared NUMERIC_VALUE_COMMAND ({Null operation}) c n n n y # The three assignment constructs below are executed last for each # period. They are equivalent to these lines from the perl script: # $prev_sar = $sar; # $prev_af = $af; # $prev_ep = $ep; NUMERIC_ASSIGNMENT_COMMAND e Previous SAR := SAR shared NUMERIC_VALUE_COMMAND ({Previous SAR value}) c shared NUMERIC_VALUE_COMMAND ({SAR}) c n y NUMERIC_ASSIGNMENT_COMMAND e Previous AF := AF shared NUMERIC_VALUE_COMMAND ({Previous AF value}) c shared NUMERIC_VALUE_COMMAND ({AF}) c n y NUMERIC_ASSIGNMENT_COMMAND e Previous EP := EP shared NUMERIC_VALUE_COMMAND ({Previous EP value}) c shared NUMERIC_VALUE_COMMAND ({EP}) c n y # This last sub-operator of the main command sequence is required in order # to provide the resulting value of the calculation for the period: SAR. shared NUMERIC_VALUE_COMMAND ({SAR}) c y n s - x |
From: Jim C. <jt...@di...> - 2003-05-22 00:07:05
|
Hi Chris. > Jim, > > Still can't get this thing to work for me. Placed fakemail into my c: = > root > dir and still getting error messages. > > If there is an error in the data set, does the program quit with the = > whole > market analysis? Or does it just skip that symbol and move to the next = > one? If there is simply an error in the data set, it should print: Errors occurred while processing [symbol] and attempt to process the data anyway, omitting unparsable records (and if every record is bad, resulting in an empty data set). However, there are other kinds of errors that can occur (some originating in the GUI), so I need to know precisely what error messages you're getting in order to try to diagnose your problem. Jim > > Chris > > -----Original Message----- > Subject: Re: [MAS-discuss] Hello?=20 > > > > Thanks again Jim for the help... > >=20 > > Ok... I set the environment variable up, but now I'm unsure of what to = > > > =3D run exactly and in what order: > >=20 > > Do I run: > > 1 - server batch > > 2 - fake mailer match > > 3 - client btach and run market analysis? > > Hi Chris - I think the problem is that, since you've set the variable to > \chrisyeoh\My Documents\Investments\mas1.6.5\bin\fake_mailer.bat, the = > space > in that path is causing a problem. When mas tries to execute the > fake_mailer script, it asks the DOS shell to run the script. Since DOS > doesn't know how to handle paths with a space in them, it is failing. A > simple solution is to move the fake_mailer.bat file somewhere where the = > path > won't have a space (e.g., c:\scripts\fake_mailer.bat) and then set up = > the > registrant again with the new env. variable setting; if you want to keep = > it > where it is, you might be able to protect the space in the env. variable > setting from being eaten by DOS, but I don't know how to do that on = > Windows. > (On UNIX, you simply put a backslash before the space.) > > Jim > > >=20 > > I did that and I got this:=20 > > = > =3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D= > 3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D=3D3D > > Result for aeg is empty - symbol may be invalid. > > Result for blud is empty - symbol may be invalid. > > Result for egn is empty - symbol may be invalid. > > Error occurred initiating transfer: Connection timeout > > Result for pds is empty - symbol may be invalid. > > Result for pkx is empty - symbol may be invalid. 'C:\Documents' is not = > > > recognized as an internal or external command, operable program or=20 > > batch file. Notification to user chris failed with error: Command=20 > > 'C:\Documents and Settings > > \chrisyeoh\My Documents\Investments\mas1.6.5\bin\fake_mailer.bat -s = > '43 =3D > > TA > > Event > > s Received at 05/16/2003, 7:19:10.13 PM (Notification to chris)' chris > > <C:\Docum > > ents and Settings\chrisyeoh\My > > Documents\Investments\mas1.6.5\lib\chris175308888 > > 3' failed > > with non-zero return code: 1. |
From: Jim C. <jt...@di...> - 2003-05-20 22:34:54
|
By George you're right! I changed the initial query to select LOWER(Scode) and feed mas with = lower case stock symbols, then it started complaining about embedded = errors in the SQL for the other query (I had forgotten to change = "selecter" back to "select"). Once I changed this to use correct = syntax, it started working :-) Now I just have to learn about the rest of the process! Thanks for all your help, Matt. - --=20 Invalid thought detected. Close all mental processes and restart=20 body. - ----- Original Message -----=20 ... > > Hi Jim, > >=20 > > Thanks for that. > >=20 > > I've now had a chance to run it, and below is the output. It still = =3D > > looks to me like it's not getting to the point of running the data = =3D > > selection query. > >=20 > > I've also attached my mas_dbrc file. In the daily data query, the = Date =3D > > + 0 construct is used to put the Date column into a numerical (e.g. = =3D > > 20030519 ) format, rather than a string format ("2003-05-19"). >=20 > Hi Matt. >=20 > First, I worked with Pedro on his problem for a while on Friday night > and it appears that part of the problem was caused by mas not handling > upper-case symbols correctly. (This is a bug that needs fixing, at > some point.) Most likely that is also the problem you are having. > One way to fix this is to convert all the symbols in your database to > lower case. If you can't do this, perhaps there's a SQL function to > convert the case. I think what you need is a to-lower conversion for = the > symbol query. I believe the <uppersymbol> construct does work, for = the > stock data query, but if not, you could try a to-upper there. >=20 > For the date, mas wants an integer, so if you're converting it in the > query into an integer from a date, I believe that will work. >=20 > When working with Pedro, I produced another version of mas that prints = more > information, which I'll send to you in a separate email. You can run = it to > verify that the symbol case is causing the problem - it should output > something like: Symbol 'xyz' is neither a valid stock symbol, nor > a valid derivative symbol. Also, if there's another problem in your = setup, > this more verbose version could help with that, too. >=20 > Don't forget to run it with the -debug option. >=20 >=20 > Jim >=20 > >=20 > > Thanks, > >=20 > > Matt. > >=20 > >=20 > > Output :- > >=20 > > bin/mas -debug -p > > Connected. > > Disconnected. > > Connected. > > Executing database query 'select Scode from Stocks order by Scode;' > > Database statement has results. > > Number of columns in result: 1 > > Database query returned 10 rows. > > Symbol list: > > AMP > > ANZ > > BHP > > CBA > > LHG > > MIM > > NAB > > NCP > > RIO > > WBC > > Welcome to the Market Analysis Server console! (Hit <Enter> to = continue) > >=20 > > main_menu starting. > > process_main_menu starting. > > initialize_current_tradable starting. > > initialize_current_tradable - tradable list handler has 10 elements. > > executing 'current_tradable :=3D3D tradable_list_handler.item =3D > > (current_period_type) > > starting TRADABLE_DISPENSER.valid_period_type. > > starting TRADABLE_LIST_HANDLER.period_types. > > period_types (daily list) - searching for symbol 'amp' > > starting TRADABLE_LIST.search_by_symbol. > > search_by_symbol found symbol amp. > > returning from TRADABLE_LIST.search_by_symbol. > > Executing 't :=3D3D daily_market_list.item' > > starting TRADABLE_LIST.item. > > Calling update_and_load_data. > > TRADABLE_LIST.update_and_load_data calling load_data. > > TRADABLE_LIST.load_data calling setup_input_medium. > > starting DB_TRADABLE_LIST.setup_input_medium. > > db.fatal_error: False > > Connected to database - retrieving daily data. > > starting MAS_DB_SERVICES.daily_data_for_symbol. > > Executing database query 'select Scode from Stocks order by Scode;' > > Database statement has results. > > Number of columns in result: 1 > > Database query returned 10 rows. > > returning from MAS_DB_SERVICES.daily_data_for_symbol. > > Retrieval failed. > > Failed to connect to database. > > Error occurred while processing : starting =3D > > DB_TRADABLE_LIST.close_input_medium. > > returning from DB_TRADABLE_LIST.close_input_medium. > > returning from DB_TRADABLE_LIST.setup_input_medium. > > load_data: fatal error. > > returning from TRADABLE_LIST.item. > > period_types - retrieval of tradable failed. > > Failure status - not creating period-type list. > > returning from TRADABLE_LIST_HANDLER.period_types. > > returning from TRADABLE_DISPENSER.valid_period_type. > > TRADABLE_DISPENSER.item: period type was NOT valid. > > Call to tradable_list_handler.item failed, exiting ... > > Error occurred retrieving non-intraday period types for amp > > Aborting the server. > > Disconnected. > >=20 > >=20 > >=20 > > --=3D20 > > "And, of course, you have the commercials where savvy businesspeople = Get =3D > > Ahead by using their MacIntosh computers to create the ultimate = American =3D > > business product: a really sharp-looking report." > > -- Dave Barry > >=20 > > ----- Original Message -----=3D20 ... > >=20 > >=20 > > > Pedro and Matt. > > >=3D20 > > > Here is the debugging executable and indicators_persist and > > > generators_persist files compatible with it. Make sure you run it = =3D > > with the > > > -debug option (and -p, of course) and save the output and send it = to =3D > > me. > > >=3D20 > > > Also, please send me the mas_dbrc files you're using. If I get = time I =3D > > may > > > try running mas with your config. files to see if I can duplicate = the > > > problem. If not, they still could be helpful in analyzing the =3D > > debugging > > > output. > > >=3D20 > > >=3D20 > > > Jim > > >=3D20 > > >=20 > > ------=3D_NextPart_000_08DC_01C31E19.B7137FF0 > > Content-Type: application/octet-stream; > > name=3D"mas_dbrc" > > Content-Transfer-Encoding: 7bit > > Content-Disposition: attachment; > > filename=3D"mas_dbrc" > >=20 > > # MAS database configuration file > > # Format: "label_string<tab>setting" > > # ODBC data source name for MAS database > > data_source_name test > > # ID of user for MAS database > > user id user > > # Password for above user > > password pass > > # Query for stock symbols > > #stock symbol query select symbol from stock_information order by = symbol > > # ('\' at the end of the line continues the string on the next line) > > stock symbol query select Scode from Stocks order by Scode; > > #stock symbol query select Code from FloatInfo where LENGTH(Code < = 5) order > by Code; > > #watch_list where category =3D 'all' \ > > #order by symbol > > # Query for derivatives symbols > > #derivative symbol query select code from Stocks order by Scode > > # \ > > #order by symbol > >=20 > > # Start and end date specifications for queries. If eod_end_date is = not > > # specified, it defaults to "now". This also applies to = intraday_end_date. > > eod_start_date now - 3 years > > #eod_end_date now > > #intraday_start_date now - 5 days > >=20 > > # Query for stock splits > > # Note: query result fields must be: date, symbol, split-value; and = the > > # results must be sorted by date, ascending > > #stock split query select Date, Code, (Before / After) from = Announcements=20 > order by Date > > # Query for stock name > > # <symbol> indicates where to plug in the actual stock symbol and = must > > # occur somewhere in the query string. (Use <uppersymbol> if the = symbol > > # needs to be converted to upper-case for the query.) > > #stock name query select name from stock_information where symbol = =3D <symb > ol> > > # Query for derivative instrument name > > # <symbol> indicates where to plug in the actual stock symbol and = must > > # occur somewhere in the query string. > > #derivative name query select name from derivative_information where = \ > > #symbol =3D <symbol> > > daily stock data command selecter Date + 0, Open, High, Low, Last, = Volum > e from \ > > FloatInfo where Code =3D '<uppersymbol>' and Date >=3D = <eod_start_date> order by=20 > Date; > > #intraday stock data command select date, time, open_price, = high_price, \ > > #low_price, close_price, volume from intraday_stock_data where = symbol =3D \ > > #'<symbol>' and date >=3D <intraday_start_date> > > #daily derivative data command select date, open_price, high_price, = \ > > #low_price, close_price, volume, open_interest from \ > > #daily_derivative_instrument_data where symbol =3D '<symbol>' and \ > > #date >=3D <eod_start_date> > > #intraday derivative data command select date, time, open_price, \ > > #high_price, low_price, close_price, volume, open_interest from \ > > #intraday_derivative_instrument_data where symbol =3D '<symbol>' and = date >=3D \ > > #<intraday_start_date> > >=20 > > ------=3D_NextPart_000_08DC_01C31E19.B7137FF0-- > >=20 > |
From: Jim C. <jt...@di...> - 2003-05-20 19:27:24
|
> I have been trying to get MAS to give me MACD data that matches BigCharts > and Yahoo. They both use MACD values of 26, 12, & 9. MAS defaults when > installed were 13, 5, & 6. I modified all of the MACD analyzer values to > long = 26, short = 12, and average = 9, to match BigCharts and Yahoo. > > This morning I got this signal. Stephen - A couple things to check: What time period are you using for the MACD on each system? If you're using the existing MACD analyzers in MAS, these are weekly analyzers, whose purpose is to find long-term trends. Are you using a weekly time period on the other systems? (If you want daily, you'll need to use the command-line to create your own analyzers.) [You can find out what time period an analyzer is using from the mas command line, e.g.: m v 2 where 2 specifies the 2nd analyzer in the list. If you are using the same period type, another thing to check is whether you changed the right object - if you changed the MACD from the "edit indicators" menu, you will not change MACD object used in any of the market analyzers, since the objects are not shared. Another thing to check is when does the data begin? The more the start period for analysis differs in the different systems, the more likely that is to affect the results. A final note: although using 26, 12, 9 is useful for making comparisons like this, I wouldn't recommend using these settings for actual trading because they are too slow - by the time you receive the signal, the move will already have happened and if you base a trade on this your entry will be late. I've found that the 13,5,6 values are much better in this regard. I obtained these settings from Jack Hershey, who often posts in misc.invest.technical and misc.invest.futures. Jim > > Event for: BHI, date: 05/19/2003, type: MACD Crossover (Buy) > description: Crossover for weekly trading period with indicators: > MACD Difference and > MACD Signal Line (EMA of MACD Difference) > values: -0.285593, -0.325897 > > Looking at BigCharts, it show that the MACD buy crossover happened at about > 3 May. > > I also got this signal this mornings. > > Event for: CIEN, date: 05/19/2003, type: MACD Crossover and Stochastic %D > Crossover (Buy) > description: Pair of events: > left event: 05/09/2003, 12:00:00.0 AM, Crossover for weekly trading period > with indicators: > MACD Difference and > MACD Signal Line (EMA of MACD Difference) > values: -0.17077, -0.176887 > right event: 05/19/2003, 12:00:00.0 AM, Crossover for daily trading period > with indicators: > Stochastic %D and > Line > values: 29.8506, 35 > > Looking at BigCharts, it shows that the MACD buy crossover happened at > about 16 Apr. It also shows a MACD _SELL_ or yesterday, and a Stochastic > sell on 14 May with the indicators moving down and seperating. > > This should be that same math over the same set of data. How can MAS give > me an answer so dramatically different than these two other charting sources? |
From: Jim C. <jt...@di...> - 2003-05-17 00:51:06
|
> Had a really weird error when starting/running mas:- > > "NaN encountered - substituting 0." > > It appears to related to the GUI and didn't seem to have any effect on > processing. > > Can anyone help ( Jim ????? ) - I hate error messages !!! What is happening here is that the server is producing NaN (Not a Number) as a value, probably because of some impossible calculation, such as 3.5 / 0, which can happen inadvertently for some indicators. The GUI doesn't now how to display a NaN as a value, so it converts it to 0; but it tells you about it so that you will know that the displayed value is not really correct. [The actual value would have to be displayed in a parallel universe :-)] In other words, don't worry about it. Jim |
From: Jim C. <jt...@di...> - 2003-05-17 00:34:50
|
> I want to download 28 days of symbol 'A'. Does MAS make 28 request from > Yahoo for symbol 'A'? MAS retrieves the data for a particular symbol all at once, so, for example, if the cached file it is using is missing the last 10 days, it will make one request for the last 10 days of data from yahoo. |
From: Jim C. <jt...@di...> - 2003-05-16 16:39:26
|
In a previous email to the tips list, I mentioned that the database scripts are in a separate file, but neglected to mention what the file is. The latest version of the file is at the download page ( http://sourceforge.net/project/showfiles.php?group_id=6838 ). The file name is scripts1.6.5.tar.gz. |
From: Jim C. <jt...@di...> - 2003-05-16 16:38:17
|
A problem emailing MAS's generated signals is addressed below. The problem occurred on a Windows system, but it can also apply to Linux. > Ok Jim, > > I reinstalled MAS from scratch and this is what I did: > > 1 - changed "symbols" to "symbols.txt". Subsequently I changed = > mas_httprc's > symbols file name to "symbols.txt" > 2 - I got rid of all of the symbols in the "symbols.txt" file to contain > just "OSIP" and "YHOO". > 3 - Setup a registerant and setup MACD Buy and Sell signals. > 4 - set relative date to 3 months prior > 4a - ran fake_mailer > 5 - ran market analysis. > > I didn't get many errors that I got before... I got this in the server Good, it sounds like you're now succeeding in retrieving the data. > console window: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 'elm' is not recognized as an internal or external command, > operable program or batch file. OK, this is nonintuitive, but the problem is that you need to set the MAS_MAILER environment variable to the fake_mailer.bat file. If this file is not in your path, you should set MAS_MAILER to the full path of the file. After you've set MAS_MAILER, start mas up again, remove the old registrant, and create a new registrant. mas will use the MAS_MAILER variable as the "mailer" program. Make sure you set the variable first and then start up mas. (I need to redesign this - It gives a lot of users trouble.) Try the market analysis again after you've done this and let's see how far you get this time. Jim > Notification to user John Smith failed with error: Command 'elm -s '2 TA > Events R > eceived at 05/15/2003, 6:55:23.920 PM (Notification to John Smith)' > js@xyz. > net <C:\Documents and Settings\js\My > Documents\Investments\mas1.6.5\lib\c > js...@xy......' failed > with non-zero return code: 1. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Notes: > A - MAS DID create an indicator file, but it was empty. > B - Server process DID NOT quit on me. It kept running with no = > problems. > > OSIP should have a BUY signal I think, from looking at = > clearstation.com's > graph. > YHOO should not have any signals. > > Your help is greatly appreciated. > > Thanks, > > -----Original Message----- > From: Jim [mailto:xxxx]=20 > Sent: Thursday, May 15, 2003 2:05 AM > To: xxxx > Cc: xxxx > Subject: Re: [MAS-discuss] Hello?=20 > > > > Jim, > >=20 > > I am a win32 user... So very different from the others on this list. > > > [I'm also sending this to the discuss list at least part of my response = > will > be relevant for Linux users and, perhaps there are mas Windows users who > subscribe to this list. (Anyone?)] > > >=20 > > Is is possible to run reports and get indicators mailed to me=20 > > _without_ =3D a persistent data source? Ie. Just Yahoo? > > Yes, as long as mas has a place to get its data - from files, from the = > web, > or from a database, it can run a market analysis and send the resulting > signals. > > >=20 > > First off this tool is great, and if I can get over my issues then=20 > > I'll =3D be golden. > > Thanks, I'm glad you like it. I think MAS is quite powerful and = > flexible, > but its weakness is that its power is rather difficult to use. I'm = > hoping > to address that in future releases. > > >=20 > > I'm having issues running Market Analysis through the command line =3D = > > > client. > >=20 > > I am running the server with the -w option so I'm grabbing quotes from = > > > yahoo. GUI works just fine, and I can graph & view analysis on the=20 > > gui =3D with no problems. > >=20 > > I haven't changed anything in the "data" directory, but I have updated = > > > =3D the "symbols" file to list my own symbols that I want to run=20 > > analysis on. > >=20 > > I set up a registrant. I ran fake_mailer.bat to get that going. And = > =3D=20 > > then I "Run Market Analysis" from the command line client. > >=20 > > Server Output keeps showing "Result for vip is empty - symbol may be=20 > > invalid." for each symbol in my symbol file. > > This message occurs when the http retrieval for the symbol results in an > empty data set. This can occur, for example, when the eod_start_date=09 > and eod_end_date settings in your mas_httprc file result in an empty = > time > interval. For example, I just tried this setting: > > eod_start_date now > eod_end_date now > > and got the same error, since now - now is an interval of 0 length. When = > the > first data file (wat.txt in this case) in my symbol list does not yet = > exist, > the server aborts with the error: > > Result for wat is empty - symbol may be invalid. > Failed to open input file > /suse_6_3/home2/finance/.mas/charting/cached_data/wat.txt - file does = > not > exist. Error occurred retrieving non-intraday period types for wat = > Aborting > the server. > > Does your server process abort? If I try it when the file exists, it = > just > gives the "... symbol may be invalid" error but does not abort. = > (Another > thing that can cause the "... symbol may be invalid" error is having the > wrong setting for the eod_turnover_time - This can cause the server to > attempt to retrieve data for the day when it is not yet available. > > What are the above settings in your mas_httprc file? > > >=20 > > Then "Failed to open input file=20 > > C:\Applications\mas1.6.5\lib\cached_data\.txt - file does not exist.=20 > > Error occurred processing event Slope of MACD Signal Line Cross Above=20 > > 0 (Buy)with period type weekly: Error occurred retrieving non-intraday = > > > period types for . Error occurred processing event Slope of MACD=20 > > Signal Line Cross Below 0 (Sell)with period type weekly: > > Error occurred retrieving non-intraday period types for ." > > These error messages are similar to the ones I got in the above example > (excluding the signal-related errors due to a different context). The = > one > main difference is the file name: ".txt". The question is, why is it = > not > vip.txt? It may be related to the different end-line characters used = > with > DOS vs. UNIX ("\r\n" vs. "\n"). Anyway, we should first look at your > mas_httprc settings. If we fix that, the file name issue may go away. > > Actualy, another windows user recently had this same problem (except for = > the > mysterious ".txt" file name). He fixed it by simply uninstalling and > reinstalling mas. He must have changed something before the reinstall = > that > the server couldn't digest. If we can't find the cause of your problem, = > you > might try that, too. > > >=20 > > Can you help me here? > >=20 > > I am assuming that the "Run Market Analysis" will "email" to an output = > > > =3D file specified in the "fake_mailer.bat". In that output file I=20 > > should have =3D the > > signals that the server found. > >=20 > > Is this a correct assumption? > > Yes, that's how it is supposed to work. > > Let me know the answers to the above questions and we can go from there. > (Perhaps you should respond just to me so as not to overburden the other > list subscribers. If we find a solution I'll try to find time to put it = > in > the FAQ so others can refer to it.) > > > Jim > > >=20 > > Thanks for any help and I think I went through all the distr. Docs, so = > > > hopefully this isn't just a RTFM question. ------- End of Forwarded Message |
From: Jim C. <jt...@di...> - 2003-05-16 07:33:59
|
Hi franczappa. (I like your music :-)) The database scripts are in a separate tar.gz file. Sorry for not making that clear in the doc. I'm attaching the file with this email. Let me know if you need help. (You might want to consider joining the mas discuss list at http://lists.sourceforge.net/lists/listinfo/eiffel-mas-discuss .) It's gotten rather active lately and if you run into problems and I'm too busy to help, other list members may be able to help. Jim > I installed the mas rpm on my linux system. I was not able to find the > postgres database scripts the was mentioned in > /opt/mas/doc/INTRODUCTION.html. I checked directory structure of the > mas install and the 2 tar balls serversrc1.6.5.tar.gz and > clientsrc1.6.5.tar.gz, and was not able to find the postgres database > scripts. Could you run a pg_dump of you mas database and give in to me > in a replay possibly(please use the -schema-only option. I don't want > all your data) > -- > Your favorite stores, helpful shopping tools and great gift ideas. > Experience the convenience of buying online with Shop@Netscape! > http://shopnow.netscape.com/ > |