Sunday, May 19, 2013

Google Spreadsheet TREND() and FORECAST() functions to predict /forecast price of Gold in Real Time Markets.


Calculating the TREND(), FORECAST() looking at historical price of gold in Google Spreadsheet.

Being curious about how the forecast for Gold was actually reflected the real data in real life, I downloaded the historical prices of gold since 1970 until now ( 2013)
and used the Google Spreadsheet's TREND() and FORECAST() functions to see if they would come close to reality.

In fact, during the earlier years- the forecast() came close - however as the price of gold went up much much higher in 2012-2013 - the forecast() was way off.
Clearly, this forecast() has to be used with great precaution.

Again, I have not factored in the various affecting elements like Global slowdown, economic downturn the world has faced - so the historical prices do not reflect how the performance of gold in future can hold.

So - here's an example:

Strangely, the gold prices did not reflect the trending pattern from 1969 to 2013.

This spreadsheet I downloaded can be found in this URL http://www.gold.org/investment/statistics/gold_price_chart/ has data from 1969 in USD.
When I experimented this using the TREND() and the FORECAST () functions - it did not turn out the way I expected showing a linear pattern.

I used my google account, Google Drive -> Spreadsheet and only looked at the Year and the price in USD.


First, Let's look at the starting and ending dates in the actual spreadsheet.

Let's look at the starting date.. and the price of gold - i.e 1970 and price of gold was 36$ for an ounce.



Now, lets look at the ending date - here the price of gold was up at 1600.00 in spring 2013.



There are 500 lines in this spreadsheet , or 500 months worth of data.

Having Imported the spreadsheet into the Google Spreadsheet, Now, click on the Chart Icon.




let's choose the "Charts" -> and Trend


and click on Insert the "Trend" ->this shows the type of chart - indicating the price of gold in 1970 from 34$ and ounce.
and now in Spring 2013 - at 1600 USD approx.
This is the real picture of how gold has fared over the course of time.



Now, let's experiment with the TREND ( ) and FORECAST ()  for every 100 months and see if the data from the chart, reflects our formula calculated.

For this discussion - the TREND() and FORECAST() yield similar results , so I have used the TREND() function .


First for 100 days - the actual in the original spreadsheet is = 181.00
and by using the TREND()  = we get =  183.00 - so this is good. indicating - that if we had used this function for - then this would have given close to accurate results.




let's repeat the same for the next 300 months.
Actual price of gold was 383.00
TREND () is 484.00 ( so trend() overcalculated the data by 100 USD higher )
Had you taken a business decision on this - this would mean some serious consequences. ( profit or loss )






Now, we repeat the same for 500 months, as this is critical - since the price of gold shot up higher than expected in 2012 .

The actual price of gold is in line 521  at 1469.00 $ an ounce, and the calculated price using the TREND () in the next line.
Notice the actual price of gold was 1469.00 but the calculated price using the TREND() was 800.00 USD an  ounce - which is much much lower ( almost twice as low )
So, clearly the TREND() cannot be used by looking at the historical prices alone.
We might have to use a different mechanism to predict the price of Gold.

( Here my experiment was just to show that historical prices is not a reflection of future data )

The last line 5/31/2013 is what I entered to come up with E522.




Conclusion : Historical prices of Gold is not a reflection of future prices.
Gold prices are not incremental or show linear upward or downward trend.
Gold prices are seasonal in some regions of the world.
Gold price depends on global economy, and other factors like monetary conditions and slowdown or acceleration of productivity, availability, buy and sell demands.
My above experiment was to use the Google Spreadsheet's TREND() and FORECAST () functions to see if historical prices were a reflection of how it'd look like, which seemed true until 2008 and then the prediction was not even close. 

Wednesday, May 15, 2013

IBM Performance Analyzer - List of TCR reports supported


( Views expressed here are my own - and not my employer's) The IBM Tivoli Performance Analyzer has the ability to let the user view the TCR (Tivoli Common Reports) BIRT reports for the domains it supports.

The various domains ( or agents ) that the ITPA ( Performance Analyzer ) supports are
1 ) OS ( includes Linux, Windows, and Unix )
2 ) DB2
3 ) VMware
4 ) ITCAM ( IBM Tivoli Composite Appication Manager )
5) System P
6) Oracle.

So, the user has the preference of viewing the Performance analysis and Forecast details  of the domains/agents on either the TEP ( Tivoli Enterprise Portal ) Or by using the TCR BIRT Reports.

For viewing the reports on TCR, the ITPA Reports support component for TCR has to be configured after TCR is installed. The TCR is pointing to the Tivoli Data Warehouse. ( To do this - the end user has to be aware of the DataWarehouse Port number and location of the Database Drivers )

In this blog - I am writing about how TCR 2.1.1 on a RHEL 64 bit, was configured with the (ITPA) Perfomance Analyzer V6.2.3  component and pointing to a TDW ( Data Warehous) which is on the same server.

Currently only BIRT reports for ITPA is supported -although there has been some conversation towards getting Cognos support as well, and this may be taken up in the future ITM ( IBM Tivoli Monitoring ) releases.

  Below are some of the snapshots of the that were captured on TCR 2.1.1 when the ITPA plug in was added.

This shows the various IBM Tivoli Performance Analyzer Tivoli Products that are supported from ITPA.
◄
 

This below shows the various DB2 reports.
User can either view the similar reports in TCR or in the Tivoli Enterprise Portal Server ( TEPS ) GUI.
  dfdsf
◄

 

ITCAM reports : ( includes all three  components, like the RRT, WRT and CRT )
  
◄
 

Oracle Reports : 
◄
 

OS Agent Reports:  ( Windows, Linux, or UNIX can be selected within) 
◄
 

System P Reports. 
◄




◄
 

VMware reports. 
◄
 
User can drill down to view identical reports.

Wednesday, November 28, 2012

Installing PHP 5.3 on Windows 7 Professional.

Installing PHP on windows. ( since I want to set up my own WAMP server i.e Windows - Apache-MySQL and PHP  )

Go to this link where the PHP installer can be downloaded.

http://in.php.net/downloads.php



Download the installer



Run the executable
Accept the License Agreement.
( I did not accept any web server to be setup - as I had my own TomCat Apache web server. )

No changes here.


Run the installer - by choosing my directory to be installed and that was it.

This installs the PHP.




Friday, November 23, 2012

How to disable sysadmin password on ITM .


(Opinions and views are my own and not of my employer )

This was tested on ITM (IBM TIVOLI MONITORING ) 6.2.3 and I  believe it holds true for later versions also.

If after configuring the ITM and you want to disable the password , go to MEMS-> TEMS  Right click -> Configure and check on the "Advanced Settings Tab" and uncheck the "Security Validate User" checkbox.
Save and restart the TEMS.

This will let you login to ITM without entering the password.

See second snapshot below:




Not required.

Thursday, November 8, 2012

Historical Data collection database query failed on the Perfomance Analyzer.

[Views and opinions are my own and not of my employer ]

Troubleshooting tips on the Performance Analyzer


This is an error you get if the ODBC connection is not configured right.
I found this on Windows and below are some details.
tested on : ITM 623fp1

See, the Usernameand schema - and the last Error - there is some error.




To resolve this.
Go to the MEMS console and Performance Analyzer and I had to change it to the appropriate user.


test the connection and restart the Performance Agent.

This should resolve the issue.

Monday, October 29, 2012

Changing/resetting sysadmin password on Tivoli Enterprise Portal Server.

[ Opinions and views expressed are my own and does not reflect my employer )

( This article is written for Windows. )
ITM : IBM Tivoli Monitoring

If after installation of ITM 6.x ( in my case it was 623 fp1 ) you forgot the 'sysadmin' password during startup of the Tivoli Enterprise Portal Server , then open a command prompt and issue this command

net user sysadmin <new_password>

This should reset the password,and start loading the workspaces.







Friday, October 5, 2012

Stopping and Deleting Performance Analyzer Historical Collections.

Simple script to stop the ITPA ( performance Analyzer) Historical Collection  using the tacmd command.

This was tested on a AIX server and on ITM 623FP1.


Stop Historical Collection of Tivoli Performance Analyzer.

tacmd   histstopcollection

#!/bin/bash

DOMCODE=KP3
export PATH=$PATH:/opt/IBM/ITM/bin:.


# If you want to specify user and password apennd the following parameters after %COMPUTERNAME%:
# -u sysadmin -p password
tacmd tepslogin -s `hostname`

tacmd histstopcollection -a System_Health -m *AFT_PERF_ANALYZER_WHSE_AGENT

.... Likewise other Attribute Groups.
 

Delete Historical Collection
(you don't need the -t and the -o option )

tacmd tepslogin -s `hostname`  -u sysadmin -p ' '

tacmd histdeletecollection -u sysadmin -w ' ' -a "Disk_Health"

After this there should not be any entries in the TEPS Historical Collections GUI.

Deleting Tivoli Performance Analyzer Historical Collections ( Performance Analyzer )

Simple script to delete the historical collections being set up on ITPA.

This was tested on ITM/ITPA 623FP1 and should work for Unix and Linux platforms.

Make relevant changes for the path and the tacmd teps login prompts. ( in my case - there is no password for user sysadmin )


#!/bin/bash

DOMCODE=KP3
export PATH=$PATH:/opt/IBM/ITM/bin:.

tacmd tepslogin -s `hostname`  -u sysadmin -p ' '

tacmd histdeletecollection  -a "Disk_Health"
tacmd histdeletecollection -a "System_Health"
tacmd histdeletecollection -a "CPU_Utilization_LT_Status"
tacmd histdeletecollection -a "Disk_Utilization_LT_Status"
tacmd histdeletecollection -a "Mem_Utilization_LT_Status"
tacmd histdeletecollection -a "Net_Traffic_In_LT_Status"
tacmd histdeletecollection -a "Net_Traffic_Out_LT_Status"
tacmd histdeletecollection -a "CPU_Utilization_LT_Fcast"
tacmd histdeletecollection -a "Disk_Utilization_LT_Fcast"
tacmd histdeletecollection -a "Mem_Utilization_LT_Fcast"
tacmd histdeletecollection -a "Net_Traffic_In_LT_Fcast"
tacmd histdeletecollection -a "Net_Traffic_Out_LT_Fcast"

tacmd histdeletecollection -a "CPU_Utilization_NLT_Status"
tacmd histdeletecollection -a "CPU_Utilization_NLT_Fcast"
tacmd histdeletecollection -a "Mem_Utilization_NLT_Status"
tacmd histdeletecollection -a "Mem_Utilization_NLT_Fcast"
tacmd histdeletecollection -a "Disk_Utilization_NLT_Status"
tacmd histdeletecollection -a "Disk_Utilization_NLT_Fcast"
tacmd histdeletecollection -a "Net_Traffic_In_NLT_Status"
tacmd histdeletecollection -a "Net_Traffic_In_NLT_Fcast"
tacmd histdeletecollection -a "Net_Traffic_Out_NLT_Status"
tacmd histdeletecollection -a "Net_Traffic_Out_NLT_Fcast"

Wednesday, October 3, 2012

How to get the List of Historical Data Collections configured for Tivoli Performance Analyzer or other products.

If an user is interested in checking out the list of Historical Data Collections configured for Tivoli Performance Analyzer and would like to a run some commands instead of viewing the graphical output, then you can use the tacmd histlistcollections.

This command lists the exact output just like in when the user would have gone to TEPS ( Tivoli Enterprise Portal Server )and clicking on the Historical Collections button. ( as seen in the left window)


This was tested on ITM ( Tivoli Monitoring 623FP1 )
KP3 is the product code for domain support for OS Agent.







Similarly, if the user is interested in seeing the list of Historical Data Collections setup for the Linux Agent ( Product Code=lz ) -then use this command
 ./tacmd histlistcollections -t klz -u sysadmin
User has to enter the password command line in the above command.

This will list the following output
Collection Name        : Linux_CPU_SS
Collection ID          : KLZ_LNXCPU
Description            :
Product Name           : Linux
Attribute Group Name   : Linux CPU
Collection Location    : TEMA
Status                 : Started(*LINUX_SYSTEM, lin02-tfam:LZ, unity:LZ)
Filter                 :

Collection Name        : IVT_LIN_CPU_AV_SS
Collection ID          : KLZ_LNXCPUAVG
Description            : IVT_LIN_CPU_AV_SS
Product Name           : Linux
Attribute Group Name   : Linux CPU Averages
Collection Location    : TEMA
Status                 : Started(*LINUX_SYSTEM, lin02-tfam:LZ, unity:LZ)
Filter                 :